I am using firebase authentication for my iOS project. I am facing problem of account override by google login case i.e if I logged in with email or facebook login then if I click on google login then from console account getting change in Google plus.
I have disabled the multiple accounts with same email.
I am not getting this issue when I am using google plus login for first time.
This is the expected behavior. Google authentication overrides other forms of authentication like Facebook or email/password if the same email is used. If this is not a behavior you want, go to the Firebase website and leave feedback. In the meantime, here are some options:
Deal with it as is. Users many not even care about it
Turn on multiple accounts so users can sign in with either
Keep a path in your database listing user emails for Facebook authentication, and then use a Cloud Function to scan it before authenticating a user on Google, preventing login if the email is found to belong to a Facebook account.
Related
I'm currently building an application that uses sign in with Twitter. However, some users report losing their Twitter account (or also possibly getting banned from Twitter, etc), and am wondering if it's possible to switch those accounts to Google signin or email signin. Have not found docs on this, especially if the linked identifier is a Twitter handle instead of an email. Any help will be appreciated!
check here --> https://firebase.google.com/docs/auth/web/account-linking
But I think that the user must be logged in to do so, as you comment if they do not have how to enter with Twitter what you could do is a validation of additional data you have of the user (indicate their name, twitter user, something that you know about him) in a section that you build within the platform where new users can request to claim an account.
I am confused with how social oauth works? Lets say i have implemented social oauth login in my project.
user A signed up in my website with Google Oauth. I somehow put that SIGN UP WITH GOOGLE button in my sign up page and then user will click it and will be directed to a link where google will ask to authorize my app or not. If the user A allows, then at first time what information does the google server send to my server. It will send something so that i could save it in my server to know that a user A has been signed up and could give the userA a id to link it to other tables of my database which is in my server (nothing to do with google server). So real question is what will google(or any other service provider like facebook, twitter etc) send me when a new user signed up and when a existing user signed in again. what will happen if a user (already signed up) try to sign up again? or didn't authorize the website again when logging in?
If you want more detailed question, please comment and I will elaborate.
Ok first off lets use a different term than social login. Lets call it third party login and heres why.
Your application has its own login system users can create their accounts on your system by say adding an email address and creating a login name and a password. Now you want to add third party login that being, Facebook, google and twitter login. These are actually third party logins.
What you will actually be doing is linking the users third party social media accounts with your login system. The term often used for this is called account linking.
Lets say user A has created an account in your system already now A has a Facebook account so they would like to link their Facebook account with your login system. So you create a Facebook login button Facebook will return to you an id this often being the id of the user on facebooks system. So when the user logs in using Facebook you get the Facebook id back that you can store on the users account in your system.
Things get a little more confusing if user B wants to login to your system using Google and B does not already have an account in your system
when they login then you will probably get the users id and i think you get their email address back as well so you can use the email address from google so you can create them a actual account on your system and directly link the google login to it automatically.
Its been a while since i have done it but i believe that you get the user id and the email returned to you from third party providers you may want to check thought if memory serves they are not all the same and you may have to make a request to get the email address after you get the id back.
Social login is still not normalized. You have to work them out one by one unless you leverage something that do it for you like the trusstee.io solution.
It appears to be simple to use and is described here https://medium.com/me/stats/post/ef5d5a5a3943.
Our app requires Google OAuth2. When a user, with an existing Google account, authenticates with Google then we use a callback to return users to our App. This is what we want.
The issue is, for those users who do not have a Google account we ask them to create a Google account (gmail address) or connect their existing email address to Google. A user who has to follow either of these flows ends up on the "Thanks for creating a Google account page" and not back at our App.
This is supposed to work as you are expecting. There is a continue button on that page and that should bring the user back.
If that is not working, can you tell us more (about OS, client id, urls and the exact steps) or give us a link to test/reproduce? Is this on the web or on mobile app?
I'm using google authentication to sign in with firebase.
The authentication process works well and I'm able to create the credentials and authenticate.
My problem is when, after signing out from firebase and google, the user tries to sign in using google again. At this point google will automatically authenticate with the account used previously.
I tried both sign-out and disconnect option from google api but the result is the same.
I partially found what my problem was, here steps to reproduce:
Not signed in with google in app and not signed-in in safari on the device with a google account
Sign in with the application using a google account
Now I am signed-in in app AND in safari as well with the same account
When I sign-out from the application, safari is still authenticated with this user
I'm not able to see the account choice in app until I sign-out the google account from safari on the device
This problem doesn't show up if safari (point 1) was already signed-in with a different google account. In this case I will always have a choice between the two accounts in app.
Is there a way to sign out from the app and always shows the account choice when signing in with google again?
There are many Authentication URI parameters. One of them is "prompt" which could have a "select_account" value. It helped me to resolve the same issue for Auth0-service Google integration. Maybe could be useful for your issue if the SDK allows setting parameters for sign in.
See docs here: https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters
I've integrated the cocoalibspotify framework into my application, and at some point I ask the user to log in to Spotify. The login view controller presents a Facebook login, but does not switch to the Facebook application.
However, I have tested this with a friend's account that has 2-step authentication enabled for Facebook (where Facebook sends him a code to his mobile phone for completely logging in).
Spotify doesn't seem to have a two-step process for logging in for these types of Facebook accounts. Spotify just returns saying "wrong credentials".
Am I missing something, or is two-step Facebook log in not possible through Spotify?
Or is there a different way to log in a user that has 2-step auth enabled on their Facebook account?
Thanks!
I think if you try to login 3 or 4 times, then facebook very helpfully gives you an "account alert" on their website and lets you verify that you were actually trying to login and then it should work.
I'm not sure about the better way to do this. Two factor auth still trips up even many of google's login mechanisms that don't even involve oauth.