Google OAuth2 Provider
The Google OAuth2 provider enables authentication with Google accounts using OAuth2.
Capabilities
- Authentication: Google account OAuth2 authentication
- Google Services: Access to Google user profile and services
- OpenID Connect: Support for OpenID Connect with Google
- Scope Management: Configurable OAuth2 scopes
Configuration Options
| Option | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Google OAuth2 client ID |
client_secret | string | Yes | Google OAuth2 client secret |
scopes | array | No | OAuth2 scopes to request |
hosted_domain | string | No | Restrict to specific Google Workspace domain |
Example Configuration
version: "1.0"
providers:
google-oauth:
name: Google OAuth2
description: Google account authentication
provider: oauth2.google
enabled: true
config:
client_id: YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com
client_secret: YOUR_GOOGLE_CLIENT_SECRET
scopes:
- openid
- profile
- email
hosted_domain: your-company.com
Getting Google OAuth2 Credentials
- Go to Google Cloud Console
- Create or select a project
- Enable the Google+ API
- Go to Credentials → Create Credentials → OAuth 2.0 Client IDs
- Configure the OAuth consent screen
- Create OAuth2 credentials for a web application
- Add authorized redirect URIs
For detailed setup instructions, refer to the Google OAuth2 documentation.