自定义令牌格式不正确的Firebase身份验证

时间:2020-10-22 06:08:29

标签: android firebase firebase-authentication

我在Android中使用LINE登录。我想使用电子邮件登录,但无法接收电子邮件,因此登录成功后我会使用令牌,但是当我使用此令牌在Firebase上 signInWithCustomToken 时,它不会错误消息:

自定义令牌格式不正确。请检查文档。 [无效的断言格式。 ]

设置行令牌的格式:

eyJhbGciOiJIUzI1NiJ9.F_Tq08rXREsnH3SW3W2JiwYOOg56uEetp_Ef4swnIKJGDdNQPfvucWbYcFjxF_fT-32VJt4TBNbvo60fZ_ojvWnQmOF3iCpyp-CAxuuas_ejZb0StP_OeqaHlRqnOL38xGtsb-G4fmSB1KMEIrVHppw-8Eu1BNQ1dqxvnR7Llx0.2m96VdiIGvaUO19BTnGGVpsCwAeACFrdnrlD3KfKgxc

所以我想知道如何创建正确的令牌来签署Firebase身份验证或创建这样的凭证:

val credential = FacebookAuthProvider.getCredential(token.token)
FirebaseAuth.signInWithCredential(credential)

谢谢您的回答。

0 个答案:

没有答案