Intercode SaaS Kit
  • Welcome to SaaS Starter Kit
  • Getting Started
    • Technology stack
    • Database Setup
    • Local Environment Setup
  • Basics
    • Dependencies
    • App architecture
    • Deployment
    • App roles
    • Endpoints List
      • Auth
      • Two Factor Auth
      • Businesses
      • Demo
      • Email
      • Export Document
      • Email Files
      • Files Demo
      • Leads
      • Orders
      • Payments
      • Subscriptions
      • Teams
      • Team Memberships
      • User Admin
  • Animation and Styles
    • Framer Motion
    • Ant Design and Styles
  • Pages
    • Auth
      • Working with PassportJS
      • Two-Factor Auth
      • OAuth Providers
    • Leads
    • Businesses
    • Team management
      • Ownership
    • Profile
    • User Settings
      • App Tour
    • App Settings
      • Lead Statuses
    • Dashboard
      • Lead volume widget
      • Doughnut chart widget
      • Recent leads table widget
      • Lead count over period widget
    • Demo
  • Features
    • Impersonation
    • Subscriptions (Stripe)
    • Search
    • Sentry
    • Captcha
    • Audit Logs
    • Internationalization
  • External integrations
    • Mailer
    • Google oAuth2
    • Facebook oAuth2
    • S3 compatible storage (AWS, MinIO)
Powered by GitBook
On this page
  • Setup
  • Publishing Your Application
  1. External integrations

Google oAuth2

Here you can read how to set up Google Services

PreviousMailerNextFacebook oAuth2

Last updated 6 months ago

Setup

To create an OAuth 2.0 client ID in the Google Cloud Platform Console:

  1. Go to the Google Cloud Platform Console.

  2. From the projects list, select a project or create a new one.

  3. Navigate to API & Services > Credentials.

  4. Configure your OAuth consent screen:

    • Set up the app name, support email, and your app’s domain, if applicable.

  5. Create OAuth Credentials:

    • Click New Credentials and select OAuth client ID.

    • Choose Web application as the application type.

    • Add your application’s Authorized Redirect URIs (e.g., https://yourapp.com/auth/callback for production, or http://localhost:3000/auth/callback for local development).

  6. After creation, you’ll receive a Client ID and Client Secret. Copy these for use in both your front-end and backend configurations.

To delete a client ID, go to the Credentials page, check the box next to the ID, and click Delete.

  1. Configure API Passport Strategy:

  • Use the received Client ID and Client Secret.

  • Follow the for additional implementation details.


Publishing Your Application

Publishing your application will allow you to authenticate any Google user, enabling the use of your credentials in a production environment.

  1. Set Up OAuth Consent Screen for Production:

    • In the OAuth consent screen settings, add production details such as the official app name, support email, and privacy policy URL.

  2. Testing the Production Environment:

    • After deployment, thoroughly test your OAuth setup on the live site to ensure all flows (login, redirect, logout) work smoothly and securely.

    • Verify tokens are handled correctly and that your OAuth implementation behaves as expected.

  3. Monitor OAuth Usage:

    • In the Google Cloud Console, go to API & Services > Credentials to monitor usage, track traffic, and troubleshoot any potential issues.

  4. Communicate OAuth Status to Users:

    • On the login screen, inform users that they can securely log in with Google, and provide a link to your privacy policy to establish user trust.


Verification Note

Currently, no verification is required for basic scopes (e.g., email and profile). However, requesting additional scopes in the future, particularly for sensitive or restricted data, may prompt Google to require app verification. This process involves submitting your app for review to ensure it complies with Google’s data policies.


OAuth Providers documentation
Working with PassportJS
OAuth Providers