Skip to content

SSO with Google

This guide covers the configuration of Single Sign-On (SSO) authentication for rConfig V8 using Google Workspace. The process involves creating an OAuth application in Google Cloud Console and configuring rConfig with the necessary credentials.

  • Administrator access to Google Cloud Console or Google Workspace Admin Console
  • Administrator access to rConfig V8
  • rConfig server accessible via HTTPS with valid domain name

Follow Google’s official documentation to set up your custom Identity Provider in the Google Admin Console:

Google Admin Console - Set up SSO for your organization

In the Google Cloud Console:

  1. Navigate to APIs & Services > OAuth consent screen
  2. Select Internal or External based on your organization’s requirements
  3. Fill in the required application information
  4. Add authorized domains if needed
  5. Save the configuration
  1. Navigate to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Select Web application as the application type
  4. Add a name for your OAuth client (e.g., “rConfig V8”)
  5. Under Authorized redirect URIs, add:
    https://your-rconfig-domain.com/auth/callback/google
  6. Click Create
  7. Copy the Client ID and Client Secret (you’ll need these for rConfig configuration)

Open the rConfig .env file:

Terminal window
vim /var/www/html/rconfig8/current/.env

Add or update the following lines with your Google OAuth application values:

Terminal window
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=https://your-rconfig-domain.com/auth/callback/google

Configuration Parameters:

  • GOOGLE_CLIENT_ID: OAuth 2.0 Client ID from Google Cloud Console
  • GOOGLE_CLIENT_SECRET: OAuth 2.0 Client Secret from Google Cloud Console
  • GOOGLE_REDIRECT_URI: Must match the authorized redirect URI configured in Google

Save the file and clear the rConfig cache:

Terminal window
php /var/www/html/rconfig8/current/artisan rconfig:clear-all

After configuration, the rConfig login page will display a Sign in with Google button.

Google SSO Login Button

When users attempt to sign in via SSO for the first time:

  1. User authenticates successfully with Google
  2. User account is created in rConfig with SSO access disabled
  3. User sees an error message indicating approval is required

SSO Login Error

Administrator must:

  1. Log in to rConfig as an administrator
  2. Navigate to Users section
  3. Locate the new SSO user
  4. Enable SSO access for the user
  5. Assign appropriate role and permissions

After approval, the user can successfully authenticate and access rConfig.

  • Verify all environment variables are correctly set
  • Ensure cache has been cleared: php artisan rconfig:clear-all
  • Check Apache error logs for configuration issues
  • Verify redirect URI matches exactly between Google and rConfig
  • Confirm OAuth consent screen is properly configured
  • Check that the OAuth client is not restricted or disabled
  • Ensure authorized domains include your rConfig domain
  • Verify OAuth consent screen is published (not in testing mode) or user is added as a test user
  • Check that user’s email domain is authorized in the OAuth configuration
  • Confirm application is approved for the requested scopes
  • Verify administrator has enabled SSO access in Users section
  • Confirm user has been assigned an appropriate role
  • Check user account status is active