Firebase Logn with Phone OTP and GSignIn

I am working on an app in which I have successfully created a Mobile OTP system with Firebase, and now I want to integrate the Google Sign In option as well.
I need help in how to access an account that has been previously registered with a mobile number and the same email that the user is using with Google Sign-In now.
In simple words, A single account should be created for a user either he logs in via Google Sign-In or via Mobile OTP system.
If someone can please help with some example blocks or an idea, it would be great. :slight_smile: (A bit urgent as well)

Single account mean you have to give option to the user, What method they are prefer to authenticate… Google wont give you permission to synchronize their database to you. It means phone number linked with gmail account. So we suggest you to keep both the options in the home screen as
Signup via Phone number
Signup via google

So same person may login with either option. To avoid this enable autologin. If they sign up store their details in tinyDB also if they login with google ask the user to link the mobile number. Likewise If they sign in via phone ask them to link google account. You next time when the user try to login you can alert them, Already account was created…

Can you catch my point? something,

1 Like

Thanks for the quick response :slight_smile:

Yes, I am asking about the same thing. Suppose, a user has signed in via Mobile OTP while registering a new account. Then how can I set up a screen to link his Gmail ID/Password with the same account? So that the next time when he tries to login via his email/password he is redirected to the same account.

Also, I want to use the Firebase Authentication component so that the user’s password is encrypted at the server end.

Anyone authentication only possible at a time in kodular, i think so, and i just said my opinion to link. I dont think so, Once a user authenticate another time also to authenticate. If you do so, it wont be user friendly.

1 Like

So the only way to link a mobile number with Gmail is to use Firebase Database?

You can link but it wont work as like authentication…

1 Like

Yes, I know. The password won’t be encrypted. Still thanks for the help. :slight_smile: I will wait if someone else has got a better idea.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.