Google OAuth Setup Guide

Configure Google Sign-In for your HedgeFund AI System

Current Status: Google OAuth is in demo mode. Follow the steps below to set up real Google OAuth credentials.
1
Create Google Cloud Project

Go to Google Cloud Console and create a new project or select an existing one.

  • Enable the Google+ API (if not already enabled)
  • Note your project ID for later use
2
Configure OAuth Consent Screen

Set up the OAuth consent screen for your application.

  • Go to "APIs & Services" > "OAuth consent screen"
  • Choose "External" user type
  • App name: "HedgeFund AI System"
  • Add scopes: .../auth/userinfo.email and .../auth/userinfo.profile
  • Add your email as a test user
3
Create OAuth 2.0 Credentials

Create the OAuth 2.0 client credentials.

  • Go to "APIs & Services" > "Credentials"
  • Click "Create Credentials" > "OAuth 2.0 Client IDs"
  • Choose "Web application"
  • Name: "HedgeFund AI Web Client"
  • Authorized JavaScript origins:
http://localhost:8000
http://127.0.0.1:8000
  • Authorized redirect URIs:
http://localhost:8000/accounts/google/login/callback/
http://127.0.0.1:8000/accounts/google/login/callback/
4
Configure the Application

Use the management command to configure Google OAuth with your credentials.

python manage.py setup_google_oauth --client-id YOUR_CLIENT_ID --secret YOUR_CLIENT_SECRET

Replace:

  • YOUR_CLIENT_ID with the Client ID from Step 3
  • YOUR_CLIENT_SECRET with the Client Secret from Step 3
5
Test the Integration

After configuration, test the Google OAuth integration.

  • Restart your Django development server
  • Visit the login page
  • Click "Sign in with Google"
  • You should be redirected to Google's OAuth consent screen
Important: For production deployment, you'll need to:
  • Update the OAuth consent screen to "In production"
  • Add your production domain to authorized origins and redirect URIs
  • Update the ACCOUNT_DEFAULT_HTTP_PROTOCOL setting to 'https'
  • Configure proper SSL certificates