[英]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.