Cognito User Pool custom attributes do not show up in the ID token if user pool is configured with a SAML identity provider

筅森魡賤 提交于 2019-12-11 03:25:35

问题


According to the documentation, the ID token (a JWT token) created by Cognito upon user authentication is also supposed to contain the custom attributes defined for the user's User Pool. It seems that when the User Pool is configured with a SAML identity provider, the ID token does not contain those custom attributes of the user pool, but only the Cognito attributes which are mapped from the SAML token.
Note: the custom attribute is already configured when the user pool is created, therefore it does not make sense to set it up again in the SAML token, for example by configuring the remote AD FS attributes.

Is there any way to preserve a User Pool custom attribute in the ID token, in this case of using a federated identity provider? Or be able to hook into the authentication process to insert a custom attribute into the token?

Thanks for the help!

来源:https://stackoverflow.com/questions/49763113/cognito-user-pool-custom-attributes-do-not-show-up-in-the-id-token-if-user-pool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!