简体   繁体   English

从过期的Firebase身份验证令牌获取UID?

[英]Get UID from expired Firebase auth token?

For a valid token, we can call admin.auth().verifyIdToken(...) . 对于有效令牌,我们可以调用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. 在特定情况下,我们收到的令牌可能已经过期,但是它不是敏感数据,因此我们仍然想确定过期令牌后面的UID。 verifyIdToken() throws an exception when the token has expired. 当令牌过期时, verifyIdToken()会引发异常。 Is it possible to determine the UID behind an expired token as well as determine when it expired? 是否可以确定过期令牌后面的UID以及确定它何时过期?

使用任何JWT库对ID令牌进行解码,然后检查sub声明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:身份验证令牌在Firebase中过期 - error : auth token is expired in firebase 在变量中获取UID Firebase身份验证 - Get UID firebase auth in variable Firebase ID 令牌已过期。 从您的客户端应用程序获取新的 ID 令牌并重试(auth/id-token-expired)? - Firebase ID token has expired. Get a fresh ID token from your client app and try again (auth/id-token-expired)? Firestore 规则,request.auth.uid 与我从 firebase auth google signin 获得的 uid 不同 - Firestore Rules, request.auth.uid is not the same as uid I get from firebase auth google signin 使用 uid 数组从 Auth 获取 Firebase 用户 - Get Firebase Users from Auth using array of uid Flutter Firebase Auth - 捕获过期的令牌 - Flutter Firebase Auth - Catching expired token 从Firebase获取Uid - Get Uid from firebase 当前访问令牌已过期时,我如何获取新的访问令牌,谷歌 firebase 身份验证? - How i get new access token when current access token has expired, google firebase auth? Firebase身份验证-从其他用户的节点获取数据,但规则设置为“ .read”:“ $ uid === auth.uid” - Firebase authentication - get data from other user's node but rules are set to “.read”: “$uid === auth.uid” 有没有办法获得 Firebase Auth 用户 UID? - Is there any way to get Firebase Auth User UID?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM