Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to accept Cognito Access Tokens #22

Open
xavfernandez opened this issue Sep 5, 2019 · 2 comments · May be fixed by #44
Open

Unable to accept Cognito Access Tokens #22

xavfernandez opened this issue Sep 5, 2019 · 2 comments · May be fixed by #44

Comments

@xavfernandez
Copy link

Cognito access tokens are lacking the aud field (cf https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-access-token) making their decoding impossible/invalid with this library since the audience is provided & expected at the decoding step: https://github.com/labd/django-cognito-jwt/blob/master/src/django_cognito_jwt/validator.py#L64.

Would you be willing to accept a PR making the audience optional ?

@martinzugnoni
Copy link

Same happening to me. Authentication works by providing the IdToken, but it doesn't using the normal AccessToken.
I would rather use AccessToken because the IdToken contains some sensitive user data (like email, etc) that I would prefer not to send around in a token.

@danni
Copy link

danni commented Apr 7, 2021

Just a note: the module will accept the access token is the COGNITO_AUDIENCE setting is set to None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants