Looking for Advice on How to Combine Moralis Web3 Authentication with Current Application

Hello Everyone :hugs:,

Although I’m fresh to the Moralis ecosystem, I can’t wait to begin adding Web3 capability to my current application. I’ve been reading documentation and following various tutorials, but I’m running into a few obstacles and would appreciate some advice.

My current venture is a web application that manages databases and user authentication using Firebase and React. In order to improve the app, I want to integrate Moralis for Web 3 authentication and enable users to easily connect their cryptocurrency wallets.

I have the following specific queries:

First Setup: I’ve connected my app to the Moralis server and set it up. Best practices for incorporating Moralis authentication without interfering with Firebase authentication that already exists, I’m not sure about. Have these two systems ever been effectively combined? :thinking: If yes, what were the crucial steps? :thinking:

User Data Sync: How might I make sure that the user data is accurately synchronised between Firebase and Moralis? :thinking: How can I connect a person’s crypto wallet login, for instance, to their current Firebase user profile? :thinking:

Managing Multiple Wallets: It’s possible that some of my users might like to link multiple wallets. How should this be handled within Moralis? :thinking: Does managing numerous wallet addresses for a single person come with built-in features, or would this need to be implemented differently? :thinking:

Security Considerations: When implementing Web3 authentication, what are the primary security issues I should be aware of? :thinking: Exist any particular procedures or resources in Moralis that can be used to guarantee a secure implementation? :thinking:

Extra Resources: Lastly, if you know of any lessons, community threads, or extra resources that would be very beneficial for somebody in my shoes, please do share!

I also followed this :point_right: https://moralis.io/web3-social-login-sign-in-dapp-users-with-google-email-or-twitter/power-apps

I value any assistance or knowledge you may provide me. eager to absorb knowledge from this incredible community!

Thank you :pray: in advance.

Hi @Jackzz
The tutorial that you are following has some outdated content. I would recommend checking the new tutorials from the below docs.
https://docs.moralis.io/authentication-api/evm/integrations/firebase-nodejs

First Setup: When you use the wallet to sign in you basically need to create a new user in Firebase without email and by just using the wallet address. Firebase allows you to create a customer user without email.
Firebase also has an option to link to user accounts as one. So after creating the user account with wallet, you can also link it with an existing email account.

User Data Sync: You would not necessarily link the wallet to firebase but you will connect to the wallet in your client-side app using Moralis auth to verify the wallet signature and then save the user wallet details to Firebase. Which some database rules you can add some securities to make sure the user has access to the database only when the client-side wallet signature is verified wallet data stored in firebase.

Managing Multiple Wallets: You can also create multiple wallet accounts in firebase and use firebase link user functionalities to link the user with existing wallets or google account.

Security Considerations: For advanced securities I would suggest linking the wallet account with google auth account. And some strict database rules to restrict unauthorised access to the user data.

Extra Resources: https://www.youtube.com/watch?v=2HLxYYmZp94

The docs link and tutorial that I shared use the Moralis auth extension which makes it easy to set up wallet authentications with Firebase. If you have any questions about it feel free to reach [email protected]