AWS Cognito get User Group in Swift

2019-07-10 12:41发布

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条回答
一夜七次
2楼-- · 2019-07-10 13:17

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

查看更多
登录 后发表回答