firebase id token has invalid signature - facebook

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".

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.

Related

Sign in with Apple not working with Firebase/Flutter

I have a firebase project where I have enabled authentication via Google, Microsoft and recently I added Apple. Both Google and Microsoft work correctly, but Apple login is throwing an error. I have ensured I have Apple Signin enabled and I've configured Sign in with Apple on my Apple developer account.
Below is the code used to invoke it.
static Future<UserCredential> signInWithApple() async {
final appleProvider = AppleAuthProvider();
UserCredential userCredential = await FirebaseAuth.instance.signInWithProvider(appleProvider);
]
return userCredential;
}
When I click to sign in with Apple, however, I get the following error:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [firebase_auth/operation-not-allowed] The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section. [ Code flow is not enabled for Apple. ]
As you can see from the picture, it IS enabled. I've also tried downloading the latest google-service.json file, and this has no impact.
Why does Firebase think it's disabled??
Did you check the requirements which is written on firebase website
Important: To sign in with an Apple account, users must:
Have an Apple ID with two-factor authentication (2FA) enabled.
Be signed in to iCloud on an Apple device.
docs : https://firebase.google.com/docs/auth/ios/apple#configure-sign-in-with-apple

Firebase Identity Platform Release Version Authentication Problem

I wasn't having such a problem when using the old Firebase authentication methods. After accepting Identity Platform, my gmail and phone auth systems are not working in "android release" mode of my app (downloaded play store app). I'm currently search of the reason for this. I also put the sha keys to Firebase from Google Console App Signing and i also debugging authentication code base with test phone numbers and test gmails. There is no problem in code base or sha keys(my opinion). Now I am verifying oauth in Google Cloud Console. When this verification is verified, will my gmail and phone auths in android release mode be opened? And how long does this verification process take? Ios gmail and phone auth methods work well in the apple store or emulator. Also when i look at Google Cloud Console there are some errors on Identity Toolkit Api and Token Service Api.[enter image description here](https://i.stack.imgur.com/BeF3a.png)
I think the cause of the problem is identity platform integration and this validation for oauth. For what other reason do you think the firebase authentication systems (gmail and phone) works on iOS but not on Android?

In flutter, how can I generate firebase token?

I want to generate a firebase token with device id with flutter mobile application. With this generated firebase token, I want to do with login function and other process. How can I generate firebase token with device id? Only for generating purpose, not for messaging and other purpose.
...........................
In detailedly, the the procedure I want to do is :
First : get device ID from device
Second : sent to firebase that previous getting device Id and want get back a firebase token to use in my API to login and other purpose. (!!! I asked this state. I am not familiar with firebase.)

Swift iOS Firebase Google authentication with Google Console OAuth 2.0 Client IDs

How can we configure the custom created OAuth 2.0 Client IDs in the google console to our firebase project?
Our Firebase project is implementing google authentication in an iOS app.
Everything works properly:
added URL schemes
added .plist provided by firebase
In order to register our app through google we have to implement custom
OAuth 2.0 Client IDs
Problem:
How can we properly use the custom (google console) OAuth 2.0 Client ID in the firebase project? Do I need to use the new plist provided in the google console?

Connecting to Twitter using xAuth on iPhone and/or OAuth on Web?

I am building a Web site and iPhone app right now. My site and app requires registration.
I have received xAuth permission from Twitter and was going to use this for the iPhone app so that users can connect their Twitter account.
Once they connect their Twitter account, if they log in to the Web, is it possible to make it so their account is still connected?
On the other hand, I am using OAuth verification on the Web. If someone connects their Twitter account on the Web using OAuth, will they still be connected if logging onto the iPhone app?
So basically, I need to make:
User connects account on iPhone app (xAuth) -> User logs in to Web site and is still connected and can post to Twitter from both
User connects on Web (OAuth) -> User logs in to iPhone app and is still connected and can post to Twitter from both
You can do this --- basically once you do the OAuth based login it generate unique Token, so after this data reading is done using Token.
Once you get Token (it can be in Phone/web) use this details between each other so that both of your application can do the rest of operation for the same user without further login.