如何从api密钥生成自定义Auth令牌

时间:2019-10-30 07:39:19

标签: google-cloud-firestore firebase-authentication

我正在查看以下文档 [https://firebase.google.com/docs/reference/rest/auth/][1]

有关如何使用我的API密钥交换Firebase ID和刷新令牌的信息。 在文档中,我找到了示例代码和以下一些解释,

curl 'https://identitytoolkit.googleapis.com/v1/accounts:signInWithCustomToken?key=[API_KEY]' \
-H 'Content-Type: application/json' \
--data-binary '{"token":"[CUSTOM_TOKEN]","returnSecureToken":true}'

In the example above, you would replace [API_KEY] with the Web API Key of your Firebase project, [CUSTOM_TOKEN] with the generated custom Auth token. 

任何人都知道如何获得上述示例中提到的“自定义身份验证令牌”吗?

谢谢

1 个答案:

答案 0 :(得分:0)

相关问题