Skip to content

Setting Up Google Console

Follow these steps to set up OAuth credentials in Google Console:

1. Visit Google Cloud Console

Go to Google Cloud Console.

2. Open Console

Click on "Console" to access your Google Cloud Dashboard.

3. Create a New Project

  1. Navigate to "Select a Project" > "New Project".
  2. Enter a project name (e.g., DjangoGoogleAuth).
  3. Click "Create".

  1. Go to APIs & Services > OAuth Consent Screen.
  2. Choose External for production use (Internal for testing within your organization).
  3. Fill in the required fields:
  4. App Name: E.g., My Django App
  5. User Support Email
  6. Developer Contact Information
  7. Authorized Domain: Add localhost (for development) and production domains.
  8. Click Save and Continue.

5. Create OAuth Credentials

  1. Go to APIs & Services > Credentials.
  2. Click on "Create Credentials" > OAuth Client ID.
  3. Choose Web Application.

Configure Authorized Redirect URIs:

  • Development: http://localhost:8000/auth/google/callback/
  • Production: Replace localhost with your domain (e.g., https://api.example.com/auth/google/callback/).

  • Click Create.


6. Copy Client ID and Secret

After creation, note down the Client ID and Client Secret.

7. Enable OAuth Scopes

  1. Go to APIs & Services > Library.
  2. Enable the Google+ API (or People API for user profile access).