Configure Google OAuth 2.0 authentication for your Devana.ai whitemark instance.
| Variable | Description | Required | Example |
|---|---|---|---|
GOOGLE_CLIENT_ID | Google OAuth 2.0 Client ID | Yes | 123456789012-abcdefghijklmnopqrstuvwxyz123456.apps.googleusercontent.com |
GOOGLE_CLIENT_SECRET | Google OAuth 2.0 Client Secret | Yes | your-client-secret |
GOOGLE_CALLBACK_URL | Callback URL for authentication | Yes | https://your-domain.com/auth/google/callback |
Create/Select Project:
Devana.aiuserinfo.email, userinfo.profileCreate OAuth 2.0 Credentials:
Devana.ai SSOhttps://your-domain.com/auth/google/callbackAdd the following variables to your environment configuration:
# Google OAuth Configuration
GOOGLE_CLIENT_ID=123456789012-abcdefghijklmnopqrstuvwxyz123456.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_CALLBACK_URL=https://your-domain.com/auth/google/callback
Configure your whitemark to include Google as an allowed provider:
{
"allowedProviders": ["GOOGLE"],
"registrationType": ["SSO"]
}
Google provides comprehensive user information through OAuth 2.0:
| Google Field | Devana.ai Field | Notes |
|---|---|---|
email | email | Primary identifier (verified) |
given_name | firstName | First name |
family_name | lastName | Last name |
name | displayName | Full name |
id | providerId | Unique Google user identifier |
picture | - | Profile picture URL (available but not mapped) |
verified_email | - | Email verification status |
The application requests the following scopes:
https://www.googleapis.com/auth/userinfo.profile: Access to user's profile informationhttps://www.googleapis.com/auth/userinfo.email: Access to user's email addressThese scopes provide:
For Google Workspace organizations, you can restrict access to users from specific domains:
In Google Cloud Console:
Programmatic Verification:
createUserAccount functionGoogle Workspace admins can control third-party app access:
Allow/Block Apps:
App Verification:
You may request additional scopes depending on your needs:
// Additional available scopes
'https://www.googleapis.com/auth/user.addresses.read' // Address information
'https://www.googleapis.com/auth/user.birthday.read' // Birthday information
'https://www.googleapis.com/auth/user.phonenumbers.read' // Phone numbers
For long-term access, request offline access:
// Add to strategy configuration
accessType: 'offline',
approvalPrompt: 'force'
redirect_uri_mismatch:
GOOGLE_CALLBACK_URL exactly matches the authorized redirect URIinvalid_client:
GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET are correctaccess_denied:
App not verified warning:
Invalid request (400):
Enable detailed logging to see:
Google is migrating from Google Sign-In JavaScript platform to Google Identity Services:
Current Implementation:
Future Considerations:
Google APIs have usage limits:
Monitor usage in Google Cloud Console under "APIs & Services" -> "Quotas".