Skip to content

Commit

Permalink
fix: expiry in compute_engine.IDTokenCredentials
Browse files Browse the repository at this point in the history
fixes #1323
  • Loading branch information
juzna committed Jun 8, 2023
1 parent bcb85bf commit 8a0fc25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/auth/compute_engine/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def _call_metadata_identity_endpoint(self, request):
six.raise_from(new_exc, caught_exc)

_, payload, _, _ = jwt._unverified_decode(id_token)
return id_token, datetime.datetime.fromtimestamp(payload["exp"])
return id_token, datetime.datetime.utcfromtimestamp(payload["exp"])

def refresh(self, request):
"""Refreshes the ID token.
Expand Down

0 comments on commit 8a0fc25

Please sign in to comment.