Google sign-in not working in a Lovable or Bolt app? How to set it up and fix it (2026)
Prices and facts checked on each tool's official site. Plans change often, so confirm before you pay.
You asked the AI to add Sign in with Google, the button showed up, and then: Google shows redirect_uri_mismatch, sign-in sends people back to localhost, the app says Unsupported provider: provider is not enabled, or it works for you and nobody else. Google sign-in has three pieces that all have to agree: your Google Cloud OAuth client, your auth backend (Supabase, Bolt's database or Lovable's built-in backend) and your live web address. Here's how to set it up and fix the usual errors.
Quick answer
On Lovable's built-in backend, the easiest fix is Google sign-in Managed by Lovable: no Google Cloud setup at all. Everywhere else, check three things: the Authorized redirect URI on your Google OAuth client is exactly your Supabase callback URL (https://<project-ref>.supabase.co/auth/v1/callback), the Google provider is turned on with your Client ID and Client Secret, and Supabase's Site URL and Redirect URLs list your live address, not localhost. In Bolt, always test on the published site, not the preview.
Match your symptom to the cause
| What you see | Most likely cause |
|---|---|
Google shows redirect_uri_mismatch | The redirect URI isn't on your Google OAuth client, or differs by http/https, domain, path or a trailing slash |
Sign-in works, then sends you to localhost or the preview | Supabase Site URL is still http://localhost:3000, or your live URL isn't in Redirect URLs |
Unsupported provider: provider is not enabled | Google provider is off (or not saved) in the Supabase project your app actually uses |
| Google sign-in does nothing or fails inside the Bolt preview | Google's sign-in blocks iframes: test on your published site |
Works on lovable.app, breaks on your custom domain | Your own Google credentials: the custom domain's redirect URI isn't added in Google Cloud and selected in Lovable |
| Only you (or a few test users) can sign in, or Google shows a warning | OAuth app still in Testing, or you asked for scopes beyond email and profile that need Google verification |
The consent screen shows a supabase.co address instead of your app | Normal without a Supabase custom domain and Google brand verification |
The setup, in the right order
If you use Lovable with its built-in backend, skip to the Lovable section below. For a Lovable app connected to your own Supabase project, or a Bolt app:
- Turn on the Google provider first, so you can copy the callback URL. In Supabase: Authentication, Providers, Google. In Bolt: click the database icon, then Authentication, Continue with Google, and turn on Enable Google Sign In (Bolt shows the JavaScript origin and redirect URI you'll need). You can't see Bolt's Authentication settings until Bolt has created a database or you've connected Supabase.
- In Google Cloud, set up the consent screen. Create or pick a project, then in the Google Auth Platform set the app name, support email and audience (choose External for a public app).
- Create an OAuth client of type Web application. Under Authorized JavaScript origins, add your app's address (for example
https://your-app.bolt.hostor your own domain). Under Authorized redirect URIs, add the Supabase callback URL from step 1, not your app's URL. Google shows the Client Secret when you create the client, so copy it then. - Paste the Client ID and Client Secret into the Google provider settings in Supabase or Bolt, and save.
- Set Supabase's URL Configuration. In Authentication, URL Configuration, change the Site URL from
http://localhost:3000to your live address and add every live address you use (yourlovable.apporbolt.hostaddress and any custom domain) to Redirect URLs. Supabase uses the Site URL when the code doesn't pass aredirectTo, and anyredirectToaddress should be on the Redirect URLs list. - Publish, then test on the live site in a new tab. In Bolt this is required: Google's sign-in blocks iframes, so it won't work in the preview window.
Fix: redirect_uri_mismatch
Google's docs say the redirect_uri in the request has to exactly match one of the Authorized redirect URIs on your OAuth client, and that the http or https scheme, case and trailing slash all have to match. The common mistakes: adding your app's address as the redirect URI instead of the Supabase callback URL, putting the callback in JavaScript origins instead of redirect URIs, editing a different OAuth client from the one whose Client ID you pasted, or a stray slash at the end. Copy the callback URL straight from the Google provider page and paste it in, unchanged.
Fix: sign-in sends you back to localhost or the preview
Google sign-in itself worked; Supabase is sending people to the wrong place afterwards. Supabase's docs say the Site URL is the default redirect when no redirectTo is given and should be changed from http://localhost:3000 to your production URL. Set it to your live address, add every live and custom-domain address to Redirect URLs, and update both again whenever you add a domain. For preview builds you can add wildcard entries, but Supabase recommends exact URLs in production.
Fix: "Unsupported provider: provider is not enabled"
This message comes from Supabase Auth when the Google provider isn't switched on for that project. Turn Google on under Authentication, Providers (or Bolt's Authentication, Continue with Google screen), make sure the Client ID and Client Secret are filled in, and save. If it's already on, check that your app's Supabase URL points to the same project you edited: apps often end up with a second project, and the live site may use a different one from the dashboard you're looking at.
Fix: only some people can sign in, or Google shows a warning
New Google OAuth apps start in Testing. Google says Testing projects are limited to up to 100 test users, and test users see a warning before granting access. Google also says apps that only ask for name, email and profile (plain Sign in with Google) are exempt from the test-user list and warning. If you, or the AI, added other scopes such as Drive, Gmail or Calendar, those limits apply, and sensitive scopes need Google verification before the unverified app warning goes away. To open sign-in to everyone, go to Google Auth Platform, Audience and publish the app. To show your app name and logo, set up and verify your branding under Google Auth Platform, Branding; Supabase notes verification can take a few business days, and without a Supabase custom domain users see a supabase.co address on the consent screen.
Lovable: use managed Google sign-in if you can
For apps on Lovable's built-in backend, Lovable offers Google sign-in Managed by Lovable (the default): Lovable manages the OAuth client, credentials and redirect handling, and no Google Cloud Console setup is needed. Prompt Add Google login to my app so that users can sign in with their Google account and Lovable turns it on in More, Users, Settings, Google. It asks only for email and basic profile; choose Your own credentials if you need your own branding or extra scopes.
With your own credentials, Lovable lists the redirect URIs to add (your lovable.app address and any custom domains). Add each one as an Authorized redirect URI in Google Cloud, then select them in Lovable and click Save. If you connect a custom domain later, Lovable adds its redirect URL but doesn't select it, and Google sign-in fails on that domain with a redirect URI mismatch until you add it in Google Cloud and select it. Lovable also says to use a Web application client; mobile or desktop client types won't work. Managed sign-in is only for the built-in backend: a Lovable app on your own Supabase project follows the setup steps above.
What to paste into Lovable or Bolt
Google sign-in isn't working on my published app at [your live URL]. The error is: [paste the exact message]. Check that the sign-in code uses Supabase's signInWithOAuth with provider 'google', that any redirectTo uses my live URL and not localhost or the preview, and that it handles the user coming back signed in. List the exact settings I need to check in Google Cloud and in my auth settings (redirect URI, JavaScript origin, Site URL, Redirect URLs) before changing any code. Don't put my Google client secret or any secret key in browser code.
When it's time to get help
Usually it's one URL in the wrong box. Get a second pair of eyes when:
- You've checked every redirect URI and it still fails.
- It works on the default address but not on your own domain.
- You can't tell which Supabase project or Google OAuth client the live app is using.
- Sign-in works, but users land signed out or their data doesn't load.
| Option | Price | What you get |
|---|---|---|
| App Audit | $49 one-time | A plain-English written fix list for your sign-in setup and anything else that breaks, within 3 business days |
| Payments Live | $199 one-time | Stripe payments wired into your app and tested with test cards before going live |
| Launch Pack | $499 one-time | Agreed bug fixes, Stripe payments, and your app published on your own domain with HTTPS |
We confirm the scope by email before any work starts, and you can ask questions first without paying. Never send anyone your password, your Google client secret or your Supabase secret key.
Related guides
- Other things broken after publishing? See works in preview but broken after publishing.
- Signed in but data won't save? See the Supabase RLS error guide and Supabase's Oct 30 grants change.
- First time publishing? See How to publish a Lovable app or How to publish a Bolt app.
- Email sign-up or password reset emails not arriving? See Supabase sign-up emails not sending.
Sources
- Supabase: Sign in with Google (Web application client, JavaScript origins, Supabase callback URL as redirect URI, Client ID and Secret on the Google provider page, scopes, supabase.co on the consent screen without a custom domain, brand verification)
- Supabase: redirect URLs (Site URL default, change from localhost, redirectTo and the Redirect URLs list, wildcards)
- Lovable: add Google authentication (Managed by Lovable, your own credentials, redirect URIs and custom domains, Web application client, built-in backend only)
- Bolt: Google SSO for authentication (Enable Google Sign In, origin and redirect URI, test on the published site because Google blocks iframes, Testing mode, branding, publishing)
- Google: OAuth 2.0 for web server apps (redirect_uri must match exactly, including scheme, case and trailing slash)
- Google Cloud: manage app audience (Testing limited to 100 test users, warning, exemption for name/email/profile-only sign-in, publishing)
FAQ
Why does Google sign-in work in preview but not on my published Lovable or Bolt app?
Usually the live address isn't set up everywhere it needs to be. With your own Supabase project, set the Site URL in Authentication, URL Configuration to your live address and add every live and custom-domain URL to Redirect URLs. With your own Google credentials in Lovable, add each redirect URI Lovable shows (including any custom domain) to your Google OAuth client and select it in Lovable. In Bolt, test on the published site: Google's sign-in blocks iframes, so it won't work inside the Bolt preview.
What does redirect_uri_mismatch mean?
Google's error for a redirect URI that doesn't exactly match one of the Authorized redirect URIs on your OAuth client. Scheme (http vs https), domain, path and trailing slash all have to match. For a Supabase-backed app, the redirect URI is your Supabase project's callback URL, shown on the Google provider page, which looks like https://
What does "Unsupported provider: provider is not enabled" mean?
Supabase Auth is rejecting the request because the Google provider isn't turned on for the project your app is connected to. Turn Google on under Authentication, Providers in Supabase (or the Google settings in Bolt's or Lovable's Authentication screen), paste the Client ID and Client Secret, save, and check that the app points at the right Supabase project.
When should I pay someone to fix this?
When sign-in still fails after you've checked the redirect URIs and URL settings, when it only breaks on your custom domain, or before launching an app that takes payments or stores user data. StackMatch's App Audit is $49 for a written fix list, and the $499 Launch Pack includes publishing on your own domain with HTTPS.
Some links are referral links; we may earn a commission at no extra cost to you. It never changes our recommendations.