docs icon indicating copy to clipboard operation
docs copied to clipboard

Add callout for Auth.currentAuthenticatedUser not including user data unless aws.cognito.signin.user.admin is included in access token

Open chrisbonifacio opened this issue 3 years ago • 0 comments

Describe the bug Auth.currentAuthenticatedUser does not include user attributes and/or metadata unless the user's access token includes the aws.cognito.signin.user.admin scope.

To Reproduce Steps to reproduce the behavior:

  1. Configure OAuth flow for a social provider, omitting the aws.cognito.signin.user.admin scope
  2. Call Auth.currentAuthenticatedUser and try to access attributes from it
  3. Observe no attributes present
  4. If Amplify.Logger is enabled, you will see this printed to the console
Screen Shot 2022-06-09 at 11 09 08 AM

Expected behavior There should be a callout in the documentation for Auth.currentAuthenticatedUser describing this behavior and why the scope is needed

Additional context Related to https://github.com/aws-amplify/amplify-js/issues/9972

chrisbonifacio avatar Jun 09 '22 15:06 chrisbonifacio