Skip to content

Sign In with Google

Follow this guide to sign in users with Google.

Google Google login Google OAuth social login Google sign in Google authentication

Google Sign In Preview

  • Create a new Google Cloud project if you don’t already have a project you want to use.
  • Search for OAuth consent screen in the top search bar in the Google Cloud Console.
  • Click on OAuth consent screen in the search results.
  • Select User Type External and click CREATE.
  • Fill in your App information.
  • Click SAVE AND CONTINUE.
  • Click SAVE AND CONTINUE.
  • Click SAVE AND CONTINUE.
  • Click BACK TO DASHBOARD.
  • Click on Credentials under APIs & Services in the left menu.
  • Click + CREATE CREDENTIALS and then OAuth client ID in the top menu.
  • On the Create OAuth client ID page for Application Type select Web application.
  • Under Authorized JavaScript origins, add your project’s redirect URL for the Google sign-in method in the following format: https://<subdomain>.auth.<region>.nhost.run
  • Under Authorized redirect URIs add your OAuth Callback URL from Nhost.
  • Click CREATE.
  • A modal appears with your Google Client ID and Client Secret.
  • Copy and paste the Client ID and Client Secret from Google to your Nhost OAuth settings for Google. Make sure the OAuth provider is enabled in Nhost.
  • Click the checkbox “I have pasted the redirect URI into Google”.
  • Click Confirm settings.

Once you’ve configured Google as an OAuth provider in Nhost, you can sign in users using the Google provider. See the OAuth Provider Sign-In Guide for detailed implementation instructions including the complete OAuth flow, error handling, and session management.