Author: Web3Auth (https://web3auth.io)
Description: Generate Ethereum Wallet Address with Web3Auth using it's MPC based Key Management System (KMS) and store it in Firebase Realtime Database.
To install and manage extensions, you can use the Firebase console.
To install and manage extensions, you can also use the Firebase CLI:
Step 1: Run the following npm command to install the CLI or update to the latest CLI version:
npm install -g firebase-tools
Step 2: Install this extension by running the following command:
firebase ext:install web3auth/web3-wallet-generator --project=[your-project-id]
Learn more about installing extensions in the Firebase Extensions documentation: console, CLI
- Cloud Functions location: Where do you want to deploy the functions created for this extension? For help selecting a location, refer to the location selection guide.
- Client ID from Web3Auth Dashboard: What is your Client ID?
- Web3Auth Network: What is your Web3Auth Network?
- Verifier Name created on Web3Auth Dashboard: What is your Verifier Name?
- Firebase Realtime Database instance: What is the path to store the Ethereum Public Address in Firebase Realtime Database?
Take a look at how this extension works:
- Head to your Firebase console's Authentication dashboard (https://console.firebase.google.com/project/${param:PROJECT_ID}/authentication/users).
- Create a new user.
- Navigate to the Firebase console's Real Time Database (https://console.firebase.google.com/project/${param:PROJECT_ID}/database).
- You'll see a new user account with the user's details and Ethereum Public address.
Once a user's account is created from your project's authenticated users, this extension automatically generates an Ethereum Public-Private Key pair using Web3Auth. It then stores the public address and user data in the Real Time Database.
To create a user, you can either do so directly in your Authentication dashboard (https://console.firebase.google.com/project/${param:PROJECT_ID}/authentication/users), or by using any of the Firebase Authentication SDKs. For more information, check out the Authentication documentation (https://firebase.google.com/docs/auth).
With this extension, you can use Firebase Authentication to securely generate an Ethereum Public-Private Key pair with Web3Auth.
Using Firebase Authentication, you can use any of the following Firebase Authentication SDK sign-in methods with Web3Auth:
- Email and password-based authentication
- Federated identity provider integrations (Google, Apple, Facebook, Twitter, GitHub)
- Phone number authentication
- Custom auth system integrations
- Anonymous auth
Before installing this extension, set up Firebase Authentication in your Firebase project. You must also sign up for a Web3Auth account before installing this extension—you can do so on the Web3Auth Dashboard.
This extension uses the following Firebase services, which may have associated charges:
- Cloud Functions
- Firebase Authentication
- Firebase Realtime Database
This extension also uses the following third-party services:
- Web3Auth (pricing information)
You are responsible for any costs associated with your use of these services.
Before installing this extension, set up Firebase Authentication in your Firebase project. You must also signup and set up a Web3Auth account before installing this extension—you can do so with this sign up link.
Your Firebase project must be on the Blaze (pay-as-you-go) plan to install the extension. You will only be charged for the resources you use. Most Firebase services offer a free tier for low-volume use. Learn more about Firebase billing.
When installing or reconfiguring this extension, you will be billed a small amount (typically less than $0.10). See Cloud Functions under Firebase Pricing for a detailed explanation.
- Install the Firebase CLI
npm install -g firebase-tools
- Clone this repo and Install the dependencies
git clone https://github.com/Web3Auth/web3auth-firebase-extension
cd functions
npm install
npm run build