How does FirebaseUI/Firebase auth authenticate a mobile number without OTP after 1st attempt? - firebase

I am using FirebaseUI and Firebase authentication to authenticate users using phone number. During testing I saw that when I first used my phone number I was sent an OTP but after that I have uninstalled and installed my app many times but now it does not ask for OTP and just verifies the phone number and logs me in. So I would like to know how is firebaseUI/auth doing it. Is it linking android device Id to a phone number or saving it in shared preferences which is saved on cloud?
If this is not the case how is firebase UI/auth doing it ? . My app only has location permission.

Firebase tries to keep some data in your device even if it was deleted. It is called making backups.
I think this is related to my question
You just need to add these lines in your manifest file inside application tag:
android:allowBackup="false"
android:fullBackupContent="false"

Related

Firebase phone auth failing on app already in production with status code 17028

We are using firebase phone authentication to authenticate our users. We've been using it for over a year now.
Today at 13:00 GMT, new users are receiving 17028 An invalid safety_net_token was passed after entering their phone number.
I tried to verify each of the causes I found on the firebase docs:
Verifying the SHA1 and SHA256 on the firebase console (We use the fingerprints that are on the play store console)
Verifying the package name
The last app update was on October 1st and since then thousands of users created an account with Firebase Auth and there were no configuration changes on the firebase console.
Upon looking at other StackOverflow questions, the error we are getting is not the same as 17028 A safety_net_token was passed, but no matching SHA-256 was registered in the Firebase console. Please make sure that this application's packageName/SHA256 pair is registered in the Firebase Console Even though it is the same error code, in our case, it says an invalid token was passed.
We are using firebase with react-native-firebase module.
EDIT: After disabling Android device verification API from Google Cloud Console the verification is now working but with no device verification. (Users have to verify they're not robots with a CAPTCHA).
Update: It is working fine now, and the outage has been fixed.
It looks to be a firebase internal issue, and the only solution now is to disable "Android Device Verification" and all your users will see the Recaptcha page.
check
https://status.firebase.google.com/
https://status.firebase.google.com/incidents/TYeQBVB4kkzyk2kE8vbP

APNs, FCM or GCM token

How apple or google specify a token to a user or app or maybe device?
for example
for user X, with Device Iphone7, and Facebook, the apple generate one token
or
for user X, with Device Iphone7 the apple generate one
or any others...
also How google?
another question is in Web Application, How they specify tokens?
An FCM token is also known as a device instance ID; it identifies that specific app on that specific device.
If the same app is installed on another device, it will get a different device instance ID. This is even the case when it's the same user installing the same app, the instance ID on each phone will be unique.
When a different app is installed on the same device, it also gets its own device instance ID. So different apps will never share the token, no matter if they are on the same phone.
In this respect if you have multiple profiles on the same (Android) phone, they count as separate phones: if you install the same app on the same phone under two profiles, each instance of the app will get its own instance ID.
All of this means that you can target a specific app, on a specific profile of a specific phone with its token.

Verify phone number in React Native with Firebase?

I thought after firebase version 3.0.0 phone Auth would be integrated. However, I keep getting the error that firebase.auth().verifyPhoneNumber() is not a function (Node.js). I am currently working with react native, which means I am using the web API. Does anyone know how to proceed from here?
"firebase": "^4.8.0",
EDIT: I am implementing facebook, google and email as sign-in methods. My app however, requires that the users verifies his/ her phone number. All I see in the docs is how to signIn via SMS but no verification.
Thanks in advance!
When you signInWithPhoneNumber, you are essentially verifying a user's phone number. You could sign in with Facebook/Google and then linkWithPhoneNumber/updateWithPhoneNumber to the currentUser. This would update the user's phone number and verify ownership too. Phone number authentication has been supported in Firebase since version 4.x.x. BTW, this doesn't work out of the box for react-native. You would need to use a similar approach to this: Ionic2 authentication firebase

Is there a way we can find user in the Firebase by their Digits id/token?

We have 2 apps (iOS and Android) which allow user to authenticate using either phone number or through Facebook.
In case of phone number it worked like this: app launched Digits authentication flow. After user submitted code from SMS, Digits SDK provided out app with the token. App sent this token to the server which looked up user by this token and responded to the app with new or existing users.
The problem is that we have to migrate our Digits users to Firebase (as Digits will stop working at 30th September). We did a migration through the Fabric console so our Fabric and Digits apps are now linked.
The problem is that even after migration there's no way to tell if the user which signed up with phone number before the migration is the same because for the same phone number Digits and Firebase SDK will give us different tokens and user IDs (as far as I understand).
Is there a way we can find user in the Firebase by their Digits id/token?

Firebase Phone Number Authentication Issue

I am using firebase in my project for phone number verification.
A few phone numbers have this issue. Alert like
"There seems to be a problem with your project's firebase phone number authentication set-up, please make sure to follow the instructions found at https:// firebase.google.com/docs/auth/ios/phone-auth"
Any idea where to look next? Thanks in advance.
Alert Msg Screenshot
You get this message if the user has disabled notifications.
To use phone number authentication, your app must be able to receive
silent APNs notifications from Firebase.
https://firebase.google.com/docs/auth/ios/phone-auth

Resources