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

check_token() renew after access_token expired does not work #109

Open
humanborg opened this issue May 7, 2018 · 4 comments
Open

check_token() renew after access_token expired does not work #109

humanborg opened this issue May 7, 2018 · 4 comments
Assignees
Labels
Projects

Comments

@humanborg
Copy link

u = Cognito(pool_id, client_id, username=username, access_token=access_token, refresh_token=refresh_token)
u.check_token()

This throws 'NotAuthorizedException', when access_token expired.

Per documentation: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html, using refresh_token (default 30 days after user authenticate) is valid we should be able to refresh the id and access_token.

@bjinwright bjinwright added the bug label May 19, 2018
@bjinwright bjinwright added this to To do in v0.7 May 19, 2018
@Immortalin
Copy link

Immortalin commented Sep 29, 2018

@bjinwright any progress on this? Or is there any workarounds?

@Zuiluj
Copy link

Zuiluj commented Oct 16, 2019

Might be connected with the request that must be signed, although this does not require signed credentials. I'm looking into it right now. For the time being, try making the client request unsigned.

@rednap
Copy link

rednap commented Feb 3, 2020

we're not getting new ID and auth tokens after an hour, looking here:
https://github.com/capless/warrant/blob/master/warrant/__init__.py#L546

the authflow warrant is using is "REFRESH_TOKEN".

from aws docs:
To use the refresh token to get new ID and access tokens with the user pool API, use the AdminInitiateAuth or InitiateAuth methods. Pass REFRESH_TOKEN_AUTH for the AuthFlow parameter.

happy to do a pull request if this is indeed an issue.
cheers,

@rednap
Copy link

rednap commented Feb 6, 2020

anyone reading this? Please regard my PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
v0.7
  
To do
Development

No branches or pull requests

5 participants