Top

How to Set Up Google Social Login Keys for Your App


Follow these steps to generate Google keys for social login :

1. Go to the Google Cloud console sign in with your Google account.

2. In the top navigation bar, click on the Select a Project dropdown.

3. Click on the New Project button from the project selection popup to add a new project.

4. Enter the required details for your project, then click on the Create.

5. Once the project is created, open the console’s left-side menu and navigate to APIs & Services > Credentials.

6. On the Credentials page, click on Create Credentials and select OAuth Client ID.

7. Configure the Consent Screen:

  • If this is your first time creating a client ID, click on Configure Consent Screen to set it up.
  • If you’ve already configured the consent screen, skip to Step 11.

    8. Choose the User Type:

  • Choose External if your app will be used by the public.
  • Choose Internal if it will only be used by members of your Google Workspace organization.
  • 9. Click on the Create.

    10. App registration steps :

  • Step 1 : Fill out the required details, then click on the Save and Continue
  • Step 2 : Click on Save and Continue
  • Step 3 : Click on Save and Continue
  • Step 4 : Click on Back to Dashboard

    11. After creating the project, click  Credentials from the left side menu to open the Credentials screen, click Create credentials, and select OAuth client ID from the dropdown list.

    12.On the OAuth client ID creation screen:

    1. Select the Web Application from the Application Type dropdown.
    2. Enter your OAuth 2.0 client name in the Name field. This name will not be shown to end users when they are asked to give login permission to your website.
    3. In the Authorized Redirect URLs, provide your app’s callback URL:
      • For Production: http://your-app-url.com/callback/google
      • For Local Testing: http://127.0.0.1:8000/api/auth/google/callback

    4. Click on the Create.

    13. It will display the popup with the Client ID and Client Secret. Save them for use in your project.