AWS Cognito get User Group in Swift

こ雲淡風輕ζ 提交于 2020-01-04 07:07:50

问题


So I've implemented Amazon Cognito login on an iOS app in Swift and it all works great. However I'm now trying to find out the groups that a logged in user belongs to. I can't seem to find a good way of doing this from within the app. The SDK doesn't seem to provide a way of doing so from what I can see. Any help would be much appreciated!


回答1:


Currently the groups are exposed in the ID token issued to the user. It is populated in claim "cognito:groups". More details here: http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-user-groups.html



来源:https://stackoverflow.com/questions/45524882/aws-cognito-get-user-group-in-swift

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