更新时间:2023-10-13 20:50:34
verifyIdToken
就像名称是用来验证IdToken
,而不是自定义标记.
verifyIdToken
like the name is to verify IdToken
, not custom token.
CustomToken用于sign in
的客户端.可以使用简单的JWT验证(如您的解决方案)来验证此自定义令牌(一小时后失效).
CustomToken is for client to sign in
. This custom token can be verify using simple JWT verification like your solution (it expire after one hour).
但是IdToken
是另一回事,您需要使用firebase auth进行登录过程.
But the IdToken
is another story, you need to do sign in process using firebase auth.
在登录后从客户端获取Id Token
,这取决于客户端是Android,Web还是IOS.
可以在此部分中阅读获取IdToken
的代码.
To Get The Id Token
from client after signIn, it's depend whether the client is Android, Web, or IOS.
The code to get the IdToken
can be read in this section