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!
Asked
Active
Viewed 686 times
1 Answers
0
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

Vinay Kushwaha
- 1,767
- 11
- 12
-
Is this for iOS SDK? – funclosure Jun 27 '18 at 03:33
-
This does not seem to work for me in swift. I get an error when attempting to access members of token.claims – Victor 'Chris' Cabral Sep 12 '18 at 23:53