Firebase Login with Embedded Wallets
Firebase is a popular backend platform that enables developers to seamlessly integrate authentication, databases, and other services into their applications. Web3Auth supports Firebase as an authentication provider, allowing developers to leverage Firebase Authentication within the Web3Auth framework for secure user login and key management.
Take a look at the supported social logins on Firebase
Create a Firebase Project
To get started, developers must first create a Firebase project in the Firebase Console. This is a required step before integrating Firebase with Web3Auth. Once the Firebase project is set up, developers can proceed to configure a Firebase connection in the Embedded Wallets Dashboard.
Web3Auth’s Firebase integration enables the use of Firebase-issued ID tokens to authenticate users, combining Firebase’s authentication flexibility with Web3Auth’s decentralized key infrastructure.
For detailed implementation steps and platform-specific instructions, developers can follow the Firebase documentation.
Create a Firebase Connection
To use this feature, developers must go to the Custom Connections
tab in the Embedded Wallets Dashboard.

Follow these steps to create a Firebase connection:
- Visit the Embedded Wallets Dashboard.
- Go to the
Custom Connections
section. - Click on the
Settings
icon near the Firebase connection. - Enter the
Firebase Connection ID
. - Paste
https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com
asJWKS Endpoint
. - Paste a sample
JWT Token
to auto populate the best JWT validations possible. - Select the
JWT user identifier
:email
,sub
orcustom
. - Toggle the Case Sensitivity of
User Identifier
. (Optional) - Click on
Add Custom Validations
to add validations manually.- Type iss as a field and
https://securetoken.google.com/FIREBASE-PROJECT-ID
as a value. - Next, type aud as a field and
FIREBASE-PROJECT-ID
as a value.
- Type iss as a field and
- Finally, click on the
Add Connection
button.

Usage
Since, the Firebase Connection
details are available from Dashboard, developers don't need to pass any additional parameters to the Web3AuthProvider
.
Follow our Quick Starts to setup the basic flow.
Web
const loginWithFirebaseGithub = async () => {
try {
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const githubProvider = new GithubAuthProvider();
const result = await signInWithPopup(auth, githubProvider);
const idToken = await result.user.getIdToken(true);
connectTo(WALLET_CONNECTORS.AUTH, {
authConnectionId: "w3a-firebase-demo",
authConnection: AUTH_CONNECTION.CUSTOM,
idToken,
extraLoginOptions: {
isUserIdCaseSensitive: false,
},
});
} catch (error) {
console.error("Firebase authentication error:", error);
}
};