# Base44 Google sign-in origin_mismatch: what it means and how to fix it

Source: https://vibe-fixer.com/guides/base44-google-login-origin-mismatch
Last updated: 2026-12-02

**Short answer:** origin_mismatch means the address where Google sign-in starts (for example https://yourapp.com) is not on your Google client's Authorized JavaScript origins. In Google Cloud, open Google Auth Platform, then Clients, add the exact origin with https and no path, add the www version too if used, save, and allow 5 minutes to a few hours.

## Key takeaways

- origin_mismatch means the address where Google sign-in starts is not on your Google client's Authorized JavaScript origins.
- In Google Cloud, open Google Auth Platform, then Clients, add the exact origin with https and no path, and save.
- The address with www and the one without are two different origins, so add both if people use both.
- Origins cannot contain a path, a query, a fragment or a wildcard, and must use https unless the address is localhost.
- After saving, allow 5 minutes to a few hours, then test signed out in a private window.

Login, emails or payments broke in your live app? Our AI agent fixes it in your code when your code is on GitHub, then tests your live app again.

**Something broke on your live app?** Tell us what broke. Our AI agent tries it on your live app and sends you a screenshot, free. [Check my app free](https://vibe-fixer.com/?src=guide-base44-google-login-origin-m-t#triageForm)

## What the error means

Google says: "The scheme, domain, and/or port of the JavaScript originating the authorization request may not match an authorized JavaScript origin URI registered for the OAuth client ID." In plain words, the address the sign-in started from is not on the client's list of Authorized JavaScript origins. Google's help page says the same: a request from an unregistered JavaScript origin returns origin_mismatch.

An origin is only the scheme, the domain and the port, such as `https://yourapp.com`. Google's rules say an origin cannot contain a path, a query, a fragment or a wildcard, and must use https unless it is localhost.

## The causes, and how to fix each one

Check the address in the browser bar on the page where sign-in starts. That is the origin Google compares.

### 1. The domain people use is not on the list

The address was never added, or only one form of it was. An origin includes the domain, so the address with www and the one without are two different origins.

**How to fix it**

1. In Google Cloud, open Google Auth Platform, then Clients, and open your Web application client.
2. Under Authorized JavaScript origins, add the exact address from the browser bar, for example `https://yourapp.com`.
3. If people reach the app both with and without www, add both.
4. Save, wait and retry. Google says changes "may take 5 minutes to a few hours" to take effect.

Source: [Google: OAuth 2.0 for client-side web applications](https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow), [Google Cloud Help: Manage OAuth clients](https://support.google.com/cloud/answer/15549257?hl=en)

### 2. The origin was entered in a form Google does not accept

An entry with a path (`https://yourapp.com/login`), a wildcard, or plain http on a live domain does not match.

**How to fix it**

1. Edit each entry so it is only `https://` plus the domain, with a port only if your app uses one.
2. Remove wildcard entries and list each real domain.
3. Keep http only for localhost addresses.

Source: [Google: OAuth 2.0 for client-side web applications](https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow), [Google Cloud Help: Manage OAuth clients](https://support.google.com/cloud/answer/15549257?hl=en)

### 3. Base44: custom Google OAuth is set up incompletely

Base44's custom Google OAuth needs a Builder plan or higher, a payment method on the Google Cloud project, and a custom domain connected to the app first. On the Google client, Base44 says to enter your app domain as the Authorized JavaScript origin and `https://app.base44.com/api/apps/auth/callback` as the Authorized redirect URI.

**How to fix it**

1. Connect your custom domain to the Base44 app and confirm it loads.
2. In Google Cloud, verify the domain in Google Search Console and add it as an authorized domain under Branding.
3. Under Clients, create the client and set Authorized JavaScript origins to your app domain and Authorized redirect URIs to `https://app.base44.com/api/apps/auth/callback`.
4. Under Data Access, select the `openid` and `https://www.googleapis.com/auth/userinfo.email` scopes.
5. Add public pages for your privacy policy and terms of service; Base44 says they are required for Google approval.
6. In Base44, open Dashboard, then Settings, then Authentication, turn on Google authentication, select "Use a custom OAuth from Google Console", enter the Client ID and Client Secret, and click Update.
7. Allow for Google's review: Base44 says approval "can take up to 5 days".

Source: [Base44: Managing login and registration](https://docs.base44.com/Setting-up-your-app/Managing-login-and-registration)

### 4. Supabase apps: the app address is not on both lists

Supabase says the Authorized JavaScript origins on the Google client "should also be configured as the Site URL or redirect configuration in your project", and to add only the origin, not the full path.

**How to fix it**

1. Add your app's origin (for example `https://yourapp.com`) to Authorized JavaScript origins on the Google client.
2. In Supabase, open the URL Configuration page and make sure the same address is the Site URL or on the Redirect URLs list.
3. Remove `http://localhost` from the Google client's origins when the app goes live, as Supabase advises.

Source: [Supabase: Login with Google](https://supabase.com/docs/guides/auth/social-login/auth-google)

### 5. The change is too recent

Google says changes to these settings may take 5 minutes to a few hours to take effect, so a correct fix can still fail for a while.

**How to fix it**

1. After saving, allow 5 minutes to a few hours before deciding the fix did not work.
2. Then test signed out of your app, for example in a private window.

Source: [Google Cloud Help: Manage OAuth clients](https://support.google.com/cloud/answer/15549257?hl=en)

**App broke after you published it?** Our AI agent fixes it in your code when your code is on GitHub, then tests your live app again so you see the result yourself. The first check is free. [Check my app free](https://vibe-fixer.com/?src=guide-base44-google-login-origin-m-m#triageForm)

## Why you cannot see it yourself

You're signed in, your customers aren't. You are probably already signed in, or you tested on the address that is on the list. A new person arriving on another address, such as www or the new custom domain, is the one Google stops.

## Frequently asked questions

### What is the difference between origin_mismatch and redirect_uri_mismatch?

origin_mismatch is about where sign-in starts (Authorized JavaScript origins). redirect_uri_mismatch is about where Google sends the person back (Authorized redirect URIs). Both are fixed on the same Google client. See the ["redirect_uri_mismatch" guide](https://vibe-fixer.com/guides/google-sign-in-redirect-uri-mismatch-custom-domain).

### Only the www version (or only the version without www) fails. Why?

An origin includes the domain, so they are two different origins. Add both to Authorized JavaScript origins, or send everyone to one of them.

### Can I use a wildcard to cover all my preview addresses?

No. Google says JavaScript origins cannot contain wildcard characters. Each address has to be listed.

### Can VibeFix fix it for me?

Yes, for any app whose code is on GitHub, whichever tool built it (Lovable, Bolt, Base44, Replit, v0, Cursor). The free check confirms the problem on your live app first. If you want it fixed, our AI agent finds the cause, fixes it in your code for $29 and tests your live app again. See [pricing](https://vibe-fixer.com/pricing).

## Related guides

- [Who can fix my AI-built app?](https://vibe-fixer.com/guides/vibe-coding-expert)
- [App fix price](https://vibe-fixer.com/pricing)
- [Google sign-in "redirect_uri_mismatch"](https://vibe-fixer.com/guides/google-sign-in-redirect-uri-mismatch-custom-domain)
- [Error 400: origin_mismatch on Google sign-in](https://vibe-fixer.com/guides/google-sign-in-fails-on-live-site)
- [Base44 custom domain stuck on "Pending verification" or not loading](https://vibe-fixer.com/guides/base44-custom-domain-wont-verify-or-load)
- [Why is my Base44 app not working?](https://vibe-fixer.com/guides/why-is-my-base44-app-not-working)
- [Password reset opens the wrong site](https://vibe-fixer.com/guides/email-link-invalid-or-expired)
- [Firebase Google sign-in not working: enable the provider](https://vibe-fixer.com/guides/firebase-google-sign-in-not-working-enable-provider)

## Sources (official documentation)

- [Google: OAuth 2.0 for client-side web applications (origin_mismatch, JavaScript origin rules)](https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow)
- [Google Cloud Help: Manage OAuth clients (changes can take 5 minutes to a few hours)](https://support.google.com/cloud/answer/15549257?hl=en)
- [Base44: Managing login and registration (custom Google OAuth)](https://docs.base44.com/Setting-up-your-app/Managing-login-and-registration)
- [Supabase: Login with Google](https://supabase.com/docs/guides/auth/social-login/auth-google)
- [Lovable: Google sign-in](https://docs.lovable.dev/features/google-auth)

## Fixed it? Prove it works on your live app

After the fix, the proof is a person who has never signed in starting Google sign-in on the exact address your customers use. Your own account cannot show that, because it is not new. Your AI fixed it. VibeFix proves it works on the live site.

VibeFix's free check tries the problem you describe on your live app: tell us what broke, and our AI agent tries it and sends you a screenshot. If you want it fixed, it finds the cause, fixes it in your code when your code is on GitHub, and re-checks your live app. The free check never changes your app and never emails your users. [Check my app free](https://vibe-fixer.com/?src=guide-base44-google-login-origin-m-f#triageForm)

VibeFix is independent. Google, Base44, Supabase and Lovable are trademarks of their owners.

Want it fixed for you? For any app whose code is on GitHub, whichever tool built it, VibeFix's AI agent can find the cause of this error, fix it in your code and re-check your live app. Start with a free check: https://vibe-fixer.com
