The Google OAuth integration enables you to connect your Google account to Forge, allowing you to access Google Calendar events and Gmail messages directly from your dashboard widgets.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mvriu5/forge/llms.txt
Use this file to discover all available pages before exploring further.
What it enables
Connecting your Google account unlocks two powerful widgets:- Meetings Widget: View your upcoming Google Calendar events and meetings
- Inbox Widget: Access and read your Gmail messages in one place
Required OAuth Scopes
Forge requests the following scopes from Google:https://www.googleapis.com/auth/calendar- Read and manage your Google Calendar eventshttps://www.googleapis.com/auth/gmail.readonly- Read your Gmail messages
Setup Instructions
Create a Google Cloud Project
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API and Gmail API for your project
Configure OAuth Consent Screen
- Navigate to APIs & Services > OAuth consent screen
- Select External user type (or Internal if using Google Workspace)
- Fill in the required application information:
- App name:
Forge - User support email: Your email address
- Developer contact information: Your email address
- App name:
- Add the required scopes:
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/gmail.readonly
- Add test users if your app is in testing mode
Create OAuth 2.0 Credentials
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Web application as the application type
- Configure the authorized redirect URIs:
- For development:
http://localhost:3000/api/auth/callback/google - For production:
https://yourdomain.com/api/auth/callback/google
- For development:
- Click Create and save your Client ID and Client Secret
Connect Your Account
Once configured, users can connect their Google account:- Navigate to the Settings page in your Forge dashboard
- Click Connect Google Account
- Authorize the requested permissions
- Your Google account is now linked and ready to use
The integration uses offline access with automatic token refresh, so you won’t need to re-authenticate frequently.
Managing Your Connection
You can manage your Google account connection from the Settings page:- View status: See if your account is connected
- Disconnect: Remove the integration and revoke access
- Reconnect: Refresh your connection if tokens expire
Troubleshooting
Authorization Error
If you see “Authorization failed” during setup:- Verify your redirect URI exactly matches the one configured in Google Cloud Console
- Ensure both Gmail API and Google Calendar API are enabled in your project
- Check that your OAuth consent screen includes all required scopes
Token Expired
If widgets show “Token expired” or similar errors:- Disconnect and reconnect your Google account from Settings
- Verify
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare correctly set
Missing Scopes
If certain features don’t work:- Ensure you added all required scopes to your OAuth consent screen
- Disconnect and reconnect to re-authorize with updated scopes