Skip to content

Configure Google Authentication

Web3 apps can select and enable user onboarding via Google by configuring the Social Auth settings in the Arcana Developer Dashboard before integrating the app with the Arcana Auth SDK.

Warning

Some of the authentication provider configuration steps are performed using the Google Console, whereas the others use the Arcana Developer Dashboard. After configuring Google, simply integrate the app with the Arcana Auth SDK, initialize the AuthProvider, and only then add code in the app to trigger user authentication via Google.

Step 1: Get Redirect URI

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.

Go to the app configuration screen on the Arcana Developer Dashboard and click Configure > Social Auth section in the LHS. Copy the redirect URI value displayed on the top RHS. This will be used in the next step to generate Google Client ID.

redirect_page

Do not close the Arcana Developer Dashboard browser tab. Open another tab and continue with the next step. Then come back to the Arcana Developer Dashboard tab and complete Google Client ID settings.

Step 2: Google Developer Console

Go to the Google Cloud Console. Create a new OAuth 2.0 credential for your dApp.

google_console_redirect

In the Google Cloud Console, select the option to set up credentials for a web application.

Google OAuth ClientID create

Specify the redirect URI value to the one that you saved in the previous step from the Auth tab of the Arcana Developer Dashboard.

Redirect URI

The redirect URI refers to the endpoint to which the Google OAuth 2.0 server can send authentication responses. These endpoints must adhere to Google’s validation rules.

Complete the steps in Google Cloud Console for creating a new OAuth 2.0 credential. It will generate a unique ClientID.

Google OAuth ClientID copy

Save the Client ID assigned by Google. It will be required in the next step.

Step 3: Update the Arcana Developer Dashboard

Revisit the Arcana Developer Dashboard. Click on the app entry and visit the application configuration screen. Click Configure > Social Auth in the LHS navigation bar. Refer to the "Google" settings and paste the Client ID assigned by Google Cloud Console in the previous step.

howto_google_auth_type

Save the settings. Arcana assigns a Client ID to every registered app. You need to save this Client ID and use it while integrating the app with the Arcana Auth SDK.

App Identifier

You are all set with the Google configuration. Integrate the Web3 app with the Arcana Auth SDK, onboard users and enable the authenticated users to sign blockchain transactions. See Arcana wallet Developer's Guide for details.


Last update: April 24, 2023 by shaloo