Google Single Sign-On Integration

Enhance your SaasRock SaaS app by integrating Google Single Sign-On.

  • Alexandro Martínez
    Author
    by Alexandro Martínez
    10 months ago
  • Environment Variables Setup

    First, you need to define the Google OAuth credentials in your .env file. Add the following lines with your specific Google client ID and secret key:

    GOOGLE_OAUTH_CLIENT_ID=abc123....apps.googleusercontent.com 
    GOOGLE_OAUTH_SECRET_KEY=GOC...abc123

    Application Configuration

    Next, enable Google authentication in your application configuration. Modify the appConfiguration.db.server.ts file as follows:

    ...
    google: {
       enabled: true,
    },

    Testing the Integration

    After setting up the environment variables and updating the application configuration, you can test the integration. Navigate to the /login and /register paths in your application and verify that the Google SSO option is available and functioning correctly.

    register-google-sso.png

    We respect your privacy.

    TLDR: We use cookies for language selection, theme, and analytics. Learn more.