Configure Firebase Authentication
Web3 apps that use Firebase for user authentication can enable authenticated users to sign blockchain transactions using the Arcana wallet. This requires configuring Firebase before integrating the app with the Arcana Auth SDK.
Warning
-
Some of the authentication provider configuration steps are performed using the Firebase Console, whereas the others use the Arcana Developer Dashboard. After configuring Firebase, simply integrate the app with the Arcana Auth SDK, initialize the
AuthProvider
, and only then add code in the app to use the Arcana Auth SDK functions for enabling authenticated users to sign blockchain transactions using the Arcana wallet. -
When utilizing global keys in the Mainnet configuration profile, developers do not need to configure the social login section in the Arcana Developer Dashboard or set up provider-specific OAuth settings to obtain a clientID. If you are using a copy of the Testnet configuration profile as the Mainnet configuration profile, remove the Social Auth section settings altogether. Simply use the Arcana assigned Client ID for integrating the app with the Arcana Auth SDK.
Step 1: Register the App
Go to the Arcana Developer Dashboard: https://dashboard.arcana.network
Register the app by creating a new entry using the 'Create New App' wizard.
Registering App
Skip this step if you have already registered your app using the Arcana Developer Dashboard and obtained a Client ID.
Use defaults for configuration settings or edit them as per the app requirements. See the How to configure an app guide for details.
Do not close the Arcana Developer Dashboard browser tab. Open another tab and access the Firebase console. Later, come back to the Arcana Developer Dashboard tab and complete the app configuration settings.
Step 2: Firebase Console
Go to the Firebase Console, and create a new project for the app that requires enabling Firebase login.
Note the Project ID that is automatically generated by Firebase for the newly created project. It will be required in the next step while completing the app configuration using the Arcana Developer Dashboard.
After creating a Firebase project, register the app with Firebase. For example, to register a web app, in the center of the Firebase console's project overview page, click the Web icon to launch the web app registration workflow.
Follow the on-screen instructions to add and initialize the Firebase SDK in your app.
You will be required to access the Firebase services such as authentication in your app. That requires you to install and configure the Firebase SDK before integrating the app with the Arcana Auth SDK.
Step 3: Update Arcana Developer Dashboard
Revisit the Arcana Developer Dashboard. Click on the app entry and visit the application dashboard. Click Configure > Social Auth section in the LHS navigation bar. Paste the Project ID assigned by Firebase Console in the 'Firebase' field.
Save the settings. Arcana assigns a unique Client ID to every registered app. Save this Client ID and use it while integrating the app with the Arcana Auth SDK.
You are all set with the Firebase configuration. Next, integrate the Web3 app with the Arcana Auth SDK and enable the authenticated users to sign blockchain transactions using the Arcana wallet. See Arcana wallet Developer's Guide for details.
Plug-and-play login feature not supported for Firebase
The plug and play feature of the Arcana Auth product is not supported for Firebase. Developers must build a custom login UI and add code to onboard users. For details, see onboarding users via Firebase and custom login UI