To connect your Auth0 client to Google and Google Apps, you will need to generate a Client ID and Client Secret in a Google project, copy these keys into your Auth0 settings, and enable the Connection.
۱٫ Access the Google API Manager
While logged in to your Google account, go to the API Manager.
۲٫ Create Your New App
To create your new app, navigate to Credentials using the left-hand menu:
While you are on the Credentials page, click on Create a project.
In the dialog box that appears, provide a Project name, answer Google’s email- and privacy-related questions, and click Create:
Google will take a moment to create your project. When the process completes, Google will prompt you to create the credentials you need.
Click on Create credentials to display a pop-up menu listing the types of credentials you can create. Select the OAuth client ID option.
۳٫ Set Up the Consent Screen
At this point, Google will display a warning banner that says, “To create an OAuth client ID, you must first set a product name on the consent screen.” Click Configure consent screen to begin this process.
Provide a Product Name that will be shown to users when they log in through Google.
۴٫ Create your Client Id and Client Secret
At this point, you will be prompted to provide additional information about your app.
Select Web application, and provide a name for your app.
Under Restrictions, enter the following information:
- Authorized redirect URI:
Click Create. Your
Client Id and
Client Secret will be displayed:
Client Id and
Client Secret to enter into the connection settings in Auth0 in Step 7.
۶٫ Enable the Admin SDK Service
If you are planning to connect to Google Apps enterprise domains, you will need to enable the Admin SDK service.
Navigate to the Library page of the API Manager.
Select Admin SDK from the list of APIs:
On the Admin SDK page, click Enable.
۷٫ Enable the Connection
Login to the Auth0 Dashboard and select Connections > Social in the left navigation.
Select the connection with the Google logo to access this connection’s Settings page:
Select each of your existing Auth0 Clients for which you want to enable this connection.
۸٫ Copy your Client Id and Client Secret into Auth0
Client Id and
Client Secret from the Credentials page of your project in the Google API Managerinto the fields on this page on Auth0.
Select the Permissions for each of the features you want to allow your app to access.
۹٫ Test your connection
Go back to the Connections > Social section of the Auth0 dashboard.
If you have configured your connection correctly, you will see a Try icon next to the Google logo:
Click Allow in the permissions pop-up screen:
If you have configured everything correctly, you will see the It works!!! page: