The method verify_token -
|
verified_claims = google.oauth2.id_token.verify_token( |
- has an additional parameter called clock_skew_in_seconds -
https://github.com/googleapis/google-auth-library-python/blob/87cd2455aca96ac3fbc4a8b2f8e4c0bba568a70b/google/oauth2/id_token.py#L114.
However, it is not possible to provide this parameter when verifying ID tokens -
|
def verify_id_token(id_token, app=None, check_revoked=False): |
I have been recently having issues where validating tokens failed from time to time with a message "Token used too early", where the timestamps were having a difference of 1-3 seconds. I have patched the admin SDK with clock_skew_in_seconds=10 argument and the issue disappeared. I do understand that my server's time synchronization is the problem in first place but being able to provide existing parameters would also be extremely helpful.
Reactions are currently unavailable
The method verify_token -
firebase-admin-python/firebase_admin/_token_gen.py
Line 392 in 6d826fd
However, it is not possible to provide this parameter when verifying ID tokens -
firebase-admin-python/firebase_admin/auth.py
Line 194 in 6d826fd
I have been recently having issues where validating tokens failed from time to time with a message "Token used too early", where the timestamps were having a difference of 1-3 seconds. I have patched the admin SDK with clock_skew_in_seconds=10 argument and the issue disappeared. I do understand that my server's time synchronization is the problem in first place but being able to provide existing parameters would also be extremely helpful.