1
votes

I'm developing an Unity game using Firebase as Identity provider. When i send Firebase ID token from Unity game through: CurrentUser.TokenAsync(true)... to my Nodejs server to verify with Firebase Admin SDK, it's ok when the token get from email/password account, but when sign in with Facebook account then the verifyIdToken from nodejs server return error: auth/argument-error with message: "Firebase ID token has invalid signature"

I'm using Firebase Unity SDK 3.0.3 and Nodejs firebase-admin: "^4.2.1".

1
It worked when i send the token from unity code but when i copy the token from android DDMS console and post to Nodejs server by Postman, the token is invalid (only with facebook sign in, username/pwd sign in still ok when post token by Postman).I don't know why.The Teppi
I have this very same problemOreoluwa

1 Answers

0
votes

This was happening to me because of a bug in my iOS app. I switched from self to [weak self] in my GET request (because the request was made in a completion handler) and the token became an optional. Adding a guard statement fixed the issue.