Mostafa Khaled
Mostafa Khaled

Reputation: 71

How to link google sign with email and password authentication for android

I can't find enough data in firebase tutorial to know How to link Google sign with email and password authentication for android. I need to sign with Google first then with email and password

Upvotes: 0

Views: 145

Answers (1)

bojeil
bojeil

Reputation: 30798

If you want to add a password to an existing Firebase User signed in with Google, you just call updatePassword on the currentUser.

If you want to link a Google credential to an email/password user, you just call linkWithCredential using the Google AuthCredential on the currentUser.

Afterwards you should be able to sign in the user with either credential.

Upvotes: 1

Related Questions