Skip to content

Amplify.Auth.getCurrentUser() returns AuthUser with incorrect username when using email based auth #3311

Open
@jniemer

Description

@jniemer

Description

When adding Cognito auth to a project, if email based sign-in is chosen then Amplify.Auth.getCurrentUser() returns an AuthUser that contains the user ID in both userId and username attributes. Expectation would be that username would contain the email address.

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. Configure Amplify Auth (amplify add auth) to use email based authentication.
  2. Sign-up, confirm and sign-in user
  3. Call Amplify.Auth.getCurrentUser().

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.10.5

Amplify Flutter Version

1.2.0

Deployment Method

Amplify CLI

Schema

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationImprovements or fixes to public documentation (docs.amplify.aws, pub.dev, readmes).authIssues related to the Auth Categoryfeature-requestA request for a new feature or an enhancement to an existing API or category.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions