Overview
The Google integration provides:- OAuth authentication via Google
- User management with Google accounts
- Single sign-on (SSO) capabilities
Setup
Step 1: Create Google OAuth Credentials
- Go to Google Cloud Console
- Create a new project or select existing
- Go to APIs & Services → Credentials
- Click “Create Credentials” → “OAuth client ID”
- Configure:
- Application type: Web application
- Name: Support Unicorn
- Authorized redirect URIs:
- Click “Create”
- Copy the Client ID and Client Secret
Step 2: Configure in Support Unicorn
- Navigate to your Support Unicorn instance
- Go to Settings → Integrations → Google
- Enter:
- Client ID
- Client Secret
- Click “Save”
Step 3: Set Environment Variables
Usage
User Authentication
Users can sign in with Google:- Click “Sign in with Google” on the login page
- User is redirected to Google for authorization
- After authorization, user is redirected back
- User account is created/linked automatically
Google Installations
Manage Google installations:Routes
| Route | Method | Description |
|---|---|---|
/google/install | GET | OAuth installation page |
/auth/google_oauth2/callback | GET/POST | OAuth callback |
/google_installations | GET | List installations |
/google_installations/:id | DELETE | Delete installation |
Configuration
OAuth Scopes
The integration requests these scopes:openidemailprofile
User Creation
When a user signs in with Google for the first time:- A new
Userrecord is created - Email and name are populated from Google profile
- User is linked to their Google account
Troubleshooting
OAuth redirect error
- Verify redirect URI matches exactly in Google Console
- Check redirect URI uses HTTPS in production
- Ensure no trailing slashes
User not created
- Check Google OAuth scopes are approved
- Verify email is provided by Google
- Review Rails logs for errors
Next Steps
Slack Integration
Connect with Slack for team communication