Skip to main content
Auth0 supports sign in with Google, allowing your users to authenticate with their Google accounts through . Adding Google as a social login option provides a fast, familiar sign-in experience that most users already trust. To set up a Google social connection, you must:
  1. Create Google OAuth credentials with the Google Auth Platform.
  2. Configure and test a Google social connection with the Auth0 Dashboard.

Before you start

Before you configure Google as a social connection, you need:
  1. An Auth0 account. If you do not have one, you can sign up for free.
  2. A Google Developer account.
  3. A Google Project.
  4. An application registered in the Auth0 Dashboard.

Google Auth Platform

The Google Auth Platform is a section within the Google Cloud Console that helps you manage your applications and OAuth credentials for logging in and calling Google APIs. To learn more, read Get started with the Google Auth Platform on Google’s documentation. Use the Google Auth Platform to:
  1. Configure the Google consent screen.
  2. Create a Google OAuth 2.0 Client.
Before creating an OAuth client ID, you must configure the OAuth consent screen with information about your application. When you use OAuth 2.0 for authorization, your application requests one or more scopes of access from a Google Account. Google displays a consent screen to the user, including a summary of your project, its policies, and the requested access scopes.
If your application requests sensitive OAuth scopes or uses a custom image, Google limits it to 100 logins until the OAuth consent screen is verified. Consent screen verification may take up to several days.
In the Google Cloud Console, configure your Google OAuth consent screen:
1

Configure branding

Navigate to Google Auth Platform > Branding. For Authorized domains, enter auth0.com. If you are using a custom domain, enter your custom domain instead.
2

Configure audience

Navigate to Google Auth Platform > Audience. For User type, select Make External. In Test Users, you can add the email addresses you want to use for testing.
3

Configure data access

Navigate to Google Auth Platform > Data Access to add or remove scopes. To learn more, read OAuth 2.0 Scopes for Google APIs on Google’s documentation.
4

Save your changes

Follow the rest of the instructions to finish configuring your Google OAuth consent screen. Select Save Changes.

Create a Google OAuth 2.0 Client

To create a Google OAuth 2.0 Client, you need your Auth0 domain, which you can find in the Auth0 Dashboard. Navigate to Auth0 Dashboard > Settings > Custom Domains to find your domain:
  • If you have not configured a custom domain, your Auth0 domain name is YOUR_TENANT_NAME.YOUR_REGIONAL_SUBDOMAIN.auth0.com. Your redirect URI is https://YOUR_TENANT_NAME.YOUR_REGIONAL_SUBDOMAIN.auth0.com/login/callback.
  • If you have configured a custom domain, use your custom domain instead. Your redirect URI is https://YOUR_CUSTOM_DOMAIN/login/callback.
If you created your US tenant before June 2020, your Auth0 domain name does not include the regional subdomain: YOUR_TENANT_NAME.auth0.com.
In the Google Cloud Console, create a new OAuth 2.0 Client:
1

Create a new client

Navigate to Google Auth Platform > Clients. Select New Client.
2

Select the application type

For the Application type, select Web application.
3

Enter your client details

Enter the following information for your OAuth 2.0 Client:
FieldValue
NameThe name of your OAuth 2.0 Client
Authorized JavaScript originshttps://YOUR_DOMAIN
Authorized redirect URIshttps://YOUR_DOMAIN/login/callback
Replace YOUR_DOMAIN with the Auth0 domain you found in the previous step.
4

Create the client

Select Create. Copy the Client ID and Client Secret that Google displays.

Configure Auth0

Use the Auth0 Dashboard to create and configure a Google social connection with the OAuth credentials you created.
1

Create a Google social connection

Navigate to Auth0 Dashboard > Authentication > Social. Select Create Connection and then Google/Gmail.
2

Enter a name and your Google credentials

In General, enter a Name for the connection and the client credentials from the Google OAuth 2.0 Client you created:
  • Client ID: The unique identifier for your application.
  • Client Secret: The secret used by Auth0 to authenticate with Google on behalf of your application.
3

Select permissions and save

Select any permissions you want to enable for the connection. Most applications need Basic Profile for the user’s email and verified email flag, and Extended Profile for name, photo, and other profile details.Select Save Changes.

Test the connection

Once you have created your Google social connection, verify that it works before deploying to production.
  1. Navigate to Auth0 Dashboard > Authentication > Social.
  2. Select the Google connection from the list.
  3. Select Try Connection.
  4. Authenticate with your Google account when prompted.
  5. Confirm that Auth0 returns user profile data, including the user’s name and email address.

Keep reading