Skip to content
Every tutorial here is 100% free — and always will be
LSLovableStudent

How do I add Google login?

Last checked 31 Aug 2026

Short answer

Ask Lovable to add Google sign-in — it can use Lovable's managed Google OAuth for a quick setup, or your own Google Cloud OAuth credentials if you need custom branding or scopes.

Two ways to set it up

Lovable supports adding Google authentication in two modes:

  • Lovable-managed Google OAuth — quicker, uses shared OAuth credentials Lovable manages, good for getting Google sign-in working fast.
  • Your own Google Cloud OAuth credentials — needed if you want your own consent screen branding, custom scopes, or you're publishing an app that needs Google's own verification.

Requesting it

Add Google sign-in to my login page using Lovable's managed Google OAuth

or, if you already have Google Cloud credentials:

Add Google sign-in using our own Google OAuth client ID and secret — I'll paste them in as secrets

Setting up your own credentials (if needed)

  1. Create an OAuth client in Google Cloud Console.
  2. Set the authorised redirect URI to the one Lovable/Supabase auth provides for your project.
  3. Give Lovable the client ID and secret to store as secrets — never paste them into front-end code.

What usually goes wrong

  • Redirect URI mismatch — Google rejects the sign-in if the URI configured in Google Cloud Console doesn't exactly match the one your backend uses. Double-check trailing slashes and http vs https.
  • Testing on a preview URL that isn't in the authorised list, causing sign-in to fail only in preview, not production, or vice versa.
  • Assuming Google login alone secures your data — it only confirms identity; you still need RLS policies for what a logged-in Google user can access.
  • Publishing with the managed option when Google's verification process requires your own branded consent screen — check whether that matters for your audience.

Verifying it works

Test on both your Preview URL and your published custom domain if you have one — OAuth redirect settings are often domain-specific.

Related: /questions/how-do-i-add-login-to-lovable, /questions/why-isn-t-my-login-working.

Sources

Was this answer helpful?

Related questions

Website made, maintained and hosted by PromptSites.com

PromptSites logo