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

tokenID verification error #1648

Open
narendrachettri opened this issue Jan 7, 2022 · 1 comment
Open

tokenID verification error #1648

narendrachettri opened this issue Jan 7, 2022 · 1 comment
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@narendrachettri
Copy link

narendrachettri commented Jan 7, 2022

id_token.verify_oauth2_token(auth_token,requests.Request()) throws an exception "Token used too early, 1641533161 < 1641533187" while verifying a token

@busunkim96
Copy link
Contributor

Hi @narendrachettri,

I think you're running into googleapis/google-auth-library-python#889.

verify_oauth2_token accepts a clock_skew_in_seconds.

For example, this would allow using tokens that are up to 10 seconds early.

id_token.verify_oauth2_token(auth_token, requests.Request(), clock_skew_in_seconds=10)

https://github.com/googleapis/google-auth-library-python/blob/87cd2455aca96ac3fbc4a8b2f8e4c0bba568a70b/google/oauth2/id_token.py#L143-L161

@busunkim96 busunkim96 self-assigned this Jan 7, 2022
@busunkim96 busunkim96 added the type: question Request for information or clarification. Not an issue. label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants