Amplify-js: Auth.currentAuthenticatedUser() should return cognito:groups attribute

Created on 17 Oct 2018  路  3Comments  路  Source: aws-amplify/amplify-js

Is your feature request related to a problem? Please describe.
I have to parse the JWT token myself to actually see the groups the user is in.

Describe the solution you'd like
It's be nice if Auth.currentAuthenticatedUser() returns the cognito:groups attribute.

Auth feature-request

Most helpful comment

I figured it out! Auth.getSession().then(data => data.idToken.payload['cognito:groups'])

All 3 comments

I figured it out! Auth.getSession().then(data => data.idToken.payload['cognito:groups'])

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Resolving as per the above comment

Was this page helpful?
0 / 5 - 0 ratings