Integration of Web3auth with Firebase: Implementation Steps and Best Practices?

I have a question about integrating Web3auth with Firebase. Currently, I’m implementing login functionality using Web3Auth, which allows users to sign in using their SNS accounts or external wallets. With web3 login alone, we can only deal with on-chain data. However, there are scenarios where it’s more efficient to manage data off-chain or when there’s a need to manage private data for each user. Because of this, I’m looking to implement authentication features and data management using a traditional off-chain database(Cloud Firestore). My planned steps are as follows:

  1. Log in using Web3auth with a social account or external wallet.
  2. Detect the ADAPTER_EVENTS.CONNECTED event, request a message signature, and send the signed message to the backend.
  3. Verify the signature, and based on the address, use the Firebase Admin SDK to generate a custom authentication token and send it to the client.
  4. The client then signs into Firebase Authentication using the custom authentication token.
  5. Save user data to Firestore.

Do you see any issues with the above implementation steps? If there are more effective approaches, I’d appreciate any insights. Thank you for your guidance.

@fumiya Thanks for your recent communication.

Your request has been forwarded to our team and we will get back to you with further updates once more information becomes available.

1 Like

Hey @fumiya,
That sounds good although I’ll request you to follow the guide Using Firebase with Web3Auth. Personally consulted this guide to integrate FireBase.

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