aws-amplify / aws-amplify/docs
Add callout for Auth.currentAuthenticatedUser not including user data unless aws.cognito.signin.user.admin is included in access token
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**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

**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
Contributor guide
Assessment
This issue has not been assessed yet.