Reputation: 3376
For a valid token, we can call admin.auth().verifyIdToken(...)
. We have a specific case where the token we receive may have expired, but it is not sensitive data so we'd still like to determine the UID behind the expired token. verifyIdToken()
throws an exception when the token has expired. Is it possible to determine the UID behind an expired token as well as determine when it expired?
Upvotes: 1
Views: 184
Reputation: 7438
Decode the ID token using any JWT library, and check the sub
claim.
Upvotes: 1