I used user.unlinkFromProvider('phone') to unlink a user's phone account, leaving them with only an email/password account. I looped through user.providerData to confirm the only providerId are firebase and password. However, printing user.phoneNumber, I still see the value of the previously added phone. I'm expecting this value to be null since I've removed/unlinked the phone number.
For anyone else who comes across this, a simple user.reload() will update the user data.
Related
I have an Firebase application that allow user to sign in with google account, or sign in by phone.
Assume user signed with Google.
In the next sigining, it tried sign with phone (A number that connected to its account),
I can't indicate that it is the same user. I think it is a new user.
But Google has the information that it is same account.
Is there a way I can know it?
(Google people API is not a good option.
Because it give me only the phone user has entered here: https://myaccount.google.com/profile
That it is not in wide use.
And it is not give me the recovery phone number)
I don't have to know the number of each user.
Only to know if phone X is connected to user Y.
I'm unable to add a phone number for testing my Firebase Phone Authentication workflow. See the images below:
Firebase Phone Auth Panel
After providing a valid phone number/verification code and clicking "Add", I get this error:
I've tried to register my device multiple times over the last two weeks with the same outcome. Hopefully someone has seen this before and if so, is there a solution?
UPDATE:
I've tried the following number formats with the same results -
+1 123-456-7890
+11234567890
Long story short, I was using my personal phone number as the number for test; which I successfully used on a previous Firebase-backed project with the same feature. I removed the test phone number from the Firebase project as I had finished testing the feature. I think it very well may be a bug on Firebase's end
I was successfully able to use the phone number "+1 111-111-1111"
UPDATE:
After successfully using the '+1 111-111-1111' phone number, deleting it, and trying to re-enter it, I was greeted with the same error
You need to delete the User phoneNumber in the authentication tab before you can add (or re-add) a phone number as a test phone number
First delete number for Authentication > User Tab.
Then add number now, it works perfectly.
I have implemented Firebase Auth into my app to let my users connect with their Google accounts. So far so good, however once a user has chosen to connect with a specific account from the google account chooser popup, he won't be able to choose a different account the next time he logs in. The previously selected account will be automatically picked for the authentication.
I really don't find this behavior correct, so I am trying to fix it.
After some research I found that I can use setCustomParameters(prompt: "select_account") with the googleProvider, like so:
this.googleProvider = new firebase.auth.GoogleAuthProvider();
this.googleProvider.setCustomParameters({
prompt: "select_account",
});
More info here: https://developers.google.com/identity/protocols/oauth2/openid-connect#authenticationuriparameters
In my case, using the consent and select_account parameters don't seem to have any impact, the user does not get to choose which account to use.
Edit: It would seem that it works correctly with chrome, but not with firefox...
I have found the source of the issue, it is in fact not really an issue. The google account picker will only show up if you have other accounts registered onto the device/browser you are currently using. If you want to choose a different account that is not saved into your device/browser, you would first need to log into it via google.
I have an app available for download which uses Google Sign In. Most people do not have any problem signing in using Google Sign in so I know it is set up correctly with the right keys. However very occasionally we see the following error.
SIGN_IN_FAILED 12500
The docs say
The sign in attempt didn't succeed with the current account.
Unlike SIGN_IN_REQUIRED. when seeing this error code, there is nothing user can do to recover from the sign in failure. Switching to another account may or may not help. Check adb log to see details if any.
I suspect something has been disabled by a GSuite admin but I cannot see anything you can do to disable Google Sign In. In GSuite help I read under “View and revoke third-party applications connected to the user's Google Account”:
You can revoke service access only after it's been granted. You can't preemptively block users from granting access to specific apps.
Can anyone suggest what could cause this - for example how I could reproduce this issue by setting something in my own GSuite account?
I am developing ionic app using angularfire2, I used google signin to login user and used phone auth to link phone number to user.
I linked phone number, now the scenario is to update mobile number. I searched on internet but I didn't found any suitable documentation to update mobile number using angularfire2. But I found that there is one method to update phone number i.e. updatePhoneNumber, but I am not sure with its parameters.
Can anyone help me with this to pass correct parameters to this method and update user's phone number.
The User.updatePhoneNumber() method takes a phoneCredential parameter, which you get from the ConfirmationResult that is sent with the verification text.