Skip to content

Django + AWS Cognito: Returned Username (UUID) is not full #645

Open
@chriswachira

Description

@chriswachira

Expected behaviour

The username retrieved from Cognito should be a full and valid UUID

Actual behaviour

The returned username, which is an autogenerated UUID by Cognito (user pool configured to authenticate with email only), is not full. It misses a few characters at the end.

Example: UUID at Cognito User pool page is 01e5206c-5e37-4548-bf59-cffd34d0d296 but gets returned as 01e5206c-5e37-4548-bf59-cffd34d0, which throws a ValidationError: "'01e5206c-5e37-4548-bf59-cffd34d0' is not a valid UUID." when authenticating with my custom User model.

Any assistance will be highly appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions