Firebase Extension "Link to other provider"

Hi, there
I’m using moralis-firebase–auth-extension to build a user management.
Currently firebase can link to multiple provider to the same user id.
My target is
I have a google signIn user, and I want to signIn new web3 wallet and link to this google user.
but I can’t figure it out how to do this.
I only can logIn with wallet and then signUp new Google user to link to this web3 address account.
Thanks:)

1 Like

Hi @Blacmarc777

You will have to write custom logic to link user email with wallet address.

moralis-firebase–auth-extension creates a new user row for each wallet address. You can define a new column in user table and use it to link the wallet row with an email address. So that when user signs in with the wallet you can use the linked email to know who is the actual user.

1 Like

Hi @johnversus
thanks for reply.
so currently moralis-firebase-auth-extension did not support
link to user who using other social media login right?
because firebase auth support link to same user uid with third-party login like google or twitter…
I can link 2 different twitter accounts or google accounts to the same user uid.
so moralis did not support that, am I right?
thank you :slight_smile:

1 Like

I never tried this one but this might work since it is a feature from firebase. auth-extension generates a unique UID for each wallet login. So you can use the option to link two UID’s.

Do you mean I need to link two UUIs instaded using firebase link right? Could I customize auth-extension generates? so I can add link function for myself?

1 Like

Yes. Since it is not directly possible with the auth extension you will have to use the firebase module.

You can try using functions to link uid’s. Define a custom firebase function to link the uid’s in the backend.