Google Workspace SSO Setup (OAuth 2.0)
This guide walks you through configuring Google Workspace as your identity provider for Ledly using OAuth 2.0.
Google Workspace SSO requires Google Cloud Console access and a Ledly Enterprise plan ($1,999/mo).
Prerequisites
- Google Cloud Console access (Owner or Editor role)
- Google Workspace domain
- Ledly organization administrator access
- Ledly Enterprise plan ($1,999/mo)
Configuration Values
You’ll need this Ledly value when configuring Google:
| Setting | Value |
|---|---|
| Authorized redirect URI | https://ledlyv2-production.up.railway.app/api/sso/google/callback |
Step 1: Create Google Cloud Project
If you don’t already have a project for your organization’s integrations:
Navigate to Google Cloud Console
Go to console.cloud.google.com
Create a new project (or select existing)
- Click the project dropdown at the top
- Click New Project
- Enter a project name (e.g., “Ledly SSO”)
- Select your organization
- Click Create
Select the project
Ensure your new project is selected in the project dropdown.
Step 2: Configure OAuth Consent Screen
Navigate to OAuth consent screen
- In the left sidebar, go to APIs & Services → OAuth consent screen
Select user type
- For Google Workspace users only: Select Internal
- For any Google account: Select External (requires verification for production)
Click Create.
Configure consent screen
Fill in the required fields:
| Field | Value |
|---|---|
| App name | Ledly |
| User support email | Your support email |
| App logo | (Optional) Upload Ledly logo |
| App domain | ledly.io |
| Authorized domains | ledly.io |
| Developer contact email | Your email |
Click Save and Continue.
Configure scopes
-
Click Add or Remove Scopes
-
Add these scopes:
email- See your primary Google Account email addressprofile- See your personal info (name, profile picture)openid- Associate you with your personal info on Google
-
Click Update
-
Click Save and Continue
Test users (External only)
If you selected External user type and are in testing mode:
- Add test users who can use the app before verification
- Click Add Users
- Enter email addresses of testers
Click Save and Continue.
Summary
Review your settings and click Back to Dashboard.
For production use with External user type, you’ll need to submit for Google verification. Internal apps (Google Workspace only) don’t require verification.
Step 3: Create OAuth Credentials
Navigate to Credentials
- In the left sidebar, go to APIs & Services → Credentials
Create OAuth client ID
- Click Create Credentials at the top
- Select OAuth client ID
Configure OAuth client
| Field | Value |
|---|---|
| Application type | Web application |
| Name | Ledly SSO |
Add Authorized redirect URI
- Under Authorized redirect URIs, click Add URI
- Enter:
https://ledlyv2-production.up.railway.app/api/sso/google/callback
Click Create.
Copy credentials
A dialog will appear with your credentials:
| Credential | Description |
|---|---|
| Client ID | Your OAuth client ID (ends in .apps.googleusercontent.com) |
| Client Secret | Your OAuth client secret |
Click Download JSON to save a backup, then click OK.
Keep your Client Secret secure. Anyone with this secret could potentially impersonate your application.
Step 4: Configure Ledly
Now configure Ledly to use your Google OAuth application:
Navigate to SSO Settings
- Log in to Ledly at app.ledly.io
- Go to Settings → SSO
Select Google Workspace
Select Google Workspace (OAuth 2.0) as your identity provider.
Enter Configuration Values
Enter the values you collected from Google Cloud Console:
| Field | Value |
|---|---|
| Client ID | Your OAuth client ID |
| Client Secret | Your OAuth client secret |
Configure SSO Options
| Option | Recommended Setting |
|---|---|
| Auto-provision users | Enabled - Creates accounts for new SSO users |
| Default role | Member - New users start with member permissions |
| Allow password login | Your choice - Enable for fallback access |
Save Configuration
Click Save to apply the SSO configuration.
Step 5: Test SSO
Test with an Admin Account First
- Open an incognito/private browser window
- Navigate to your Ledly login page
- Click Sign in with SSO or enter your email
- Verify you’re redirected to Google sign-in
- Sign in with your Google Workspace account
- If prompted, consent to the permissions requested
- Confirm you’re redirected back to Ledly and logged in
Verify User Attributes
After logging in via SSO:
- Go to Settings → Profile
- Verify your name and email were populated correctly
Test JIT Provisioning (Optional)
- Have a user who doesn’t have a Ledly account sign in via SSO
- Verify their account was automatically created
Configuration Reference
OAuth Endpoints
Google uses standard OAuth 2.0/OIDC endpoints:
| Endpoint | URL |
|---|---|
| Discovery | https://accounts.google.com/.well-known/openid-configuration |
| Authorization | https://accounts.google.com/o/oauth2/v2/auth |
| Token | https://oauth2.googleapis.com/token |
| UserInfo | https://openidconnect.googleapis.com/v1/userinfo |
Requested Scopes
Ledly requests the following OAuth scopes:
| Scope | Purpose |
|---|---|
openid | Required for OIDC |
profile | Access to user’s name and profile picture |
email | Access to user’s email address |
Token Lifetimes
| Token | Default Lifetime |
|---|---|
| Access token | 1 hour |
| Refresh token | No expiration (until revoked) |
| ID token | 1 hour |
Restricting to Google Workspace Domain
To ensure only users from your Google Workspace domain can sign in:
Option 1: Use Internal App (Recommended)
When you set the OAuth consent screen to Internal, only users in your Google Workspace organization can use the app.
Option 2: Domain Verification in Ledly
Ledly validates that the email domain matches your organization’s configured domain(s). Contact support to configure domain restrictions.
Option 3: Google Workspace Admin Controls
In Google Workspace Admin:
- Go to Security → API Controls → App Access Control
- Configure which apps are allowed for your organization
Google Workspace Admin Settings
Configuring App Access
As a Google Workspace admin, you can control access to Ledly:
Navigate to Admin Console
Go to admin.google.com
Configure app access
- Go to Security → Access and data control → API controls
- Click Manage Third-Party App Access
- Add Ledly as a trusted app (using the Client ID)
Pre-approving the App
To prevent users from seeing a consent screen:
- In Admin Console, go to Security → API controls
- Click Manage Third-Party App Access
- Click Configure new app → OAuth App Name Or Client ID
- Enter your Ledly OAuth Client ID
- Select your Ledly app
- Set access to Trusted
Troubleshooting
”Access Blocked: App not verified” Error
Possible causes:
- OAuth consent screen is set to External and not verified
Solutions:
- For internal use only: Change to Internal user type
- For external use: Submit app for Google verification
- For testing: Add users to the test users list
”Invalid Client ID” Error
Possible causes:
- Client ID was not copied correctly
- OAuth client was deleted
Solutions:
- Verify the Client ID in Google Cloud Console matches Ledly
- Check that the OAuth client still exists
”Redirect URI Mismatch” Error
Possible causes:
- Redirect URI doesn’t match exactly
Solution: Verify the authorized redirect URI in Google Cloud Console is exactly:
https://ledlyv2-production.up.railway.app/api/sso/google/callbackCheck for:
- Trailing slashes (there should be none)
- HTTP vs HTTPS (must be HTTPS)
- Typos
”Access Denied” Error
Possible causes:
- User is not in Google Workspace organization (for Internal apps)
- User declined consent
- Google Workspace admin blocked the app
Solutions:
- Verify the user is a member of your Google Workspace
- Have user try again and accept consent
- Check Google Workspace admin settings for app restrictions
”OAuth consent screen not configured”
Possible causes:
- OAuth consent screen was never set up
Solution:
- Go to APIs & Services → OAuth consent screen
- Complete the consent screen configuration
- Try creating the OAuth client again
Revoking SSO Access
Remove User Access (Individual)
Users can revoke Ledly’s access to their Google account:
- Go to myaccount.google.com/permissions
- Find Ledly in the list
- Click Remove Access
Remove Access via Google Workspace Admin
- Go to admin.google.com
- Navigate to Security → API controls → Manage Third-Party App Access
- Find Ledly and change access to Blocked
Disable SSO Integration
To disable SSO for your entire organization:
In Ledly:
- Go to Settings → SSO
- Toggle off the SSO configuration or select “None” as provider
In Google (optional):
- Go to APIs & Services → Credentials
- Find your Ledly OAuth client
- Click the delete icon to remove it
Support
If you need help with Google Workspace SSO setup:
- Ledly Support: [email protected]
- Google Documentation: developers.google.com/identity
When contacting support, include:
- Your Ledly organization ID
- Your Google Cloud project ID
- Any error messages displayed
- Screenshots of your Google configuration (redact secrets)