Base44 SSO failing with redirect_uri_mismatch or AADSTS50011? Register the exact callback

2026-11-28来源 dev.toEnglish

You've set up single sign-on for your Base44 app, someone clicks Log in with SSO, and instead of coming back signed in they land on an error page from their identity provider. Google says redirect_uri_mismatch. Microsoft says AADSTS50011: The redirect URI specified in the request does not match. Other providers just say invalid redirect_uri.

In the apps we check, this is almost never a bug in the app. It's a registration problem: the provider only sends people back to callback URLs you've registered with it, and the one Base44 uses isn't on that list. By default, Base44 SSO returns to https://app.base44.com/api/apps/<APP_ID>/auth/sso/callback, not to your app's own address. Register every callback URL Base44 lists for your app with the provider, and if you've turned on the custom domain callback, register that one too. Here's how I go through it.

What you might be seeing

  • redirect_uri_mismatch
  • AADSTS50011: The redirect URI specified in the request does not match
  • invalid redirect_uri

Why it happens

  1. The Base44 callback isn't registered. The provider has your app's address (or your custom domain) in its allowed redirect URIs, instead of the Base44 SSO callback for your app ID.
  2. The custom domain callback is switched on. With Use this app's custom domain as the SSO callback enabled, Base44 sends a callback on your own domain, so the provider must allow that URL as well.
  3. The wrong app ID. The callback was built from another app's ID, for example from a copy of the app or a template, so it points at an app that isn't yours.
  4. A near miss. Providers compare the URL exactly. Google's docs say the scheme, case and trailing slash all have to match, so http instead of https or an extra / at the end is enough to fail.
  5. The app uses your workspace SSO provider. In that case Base44 shows a workspace app login callback URL instead, and it has to be added to the workspace identity provider by your workspace admin.

One thing to rule out before you go hunting: SSO for apps needs an Enterprise-tier plan (Base44 lists Business or Enterprise). Workspaces created before October 2026 can also use it on the Elite plan.

Find the cause first

  1. Find your app ID in the editor address: it's the part between /apps/ and /editor/. For example, in https://app.base44.com/apps/686404784ac37377589a1f7f/editor/... the app ID is 686404784ac37377589a1f7f.
  2. Open Dashboard > Settings > Authentication > Single sign-on (SSO) and copy every callback URL Base44 lists for your app.
  3. Open the provider's app registration and compare its allowed redirect URIs with that list, character by character.

Microsoft makes the comparison easy: the AADSTS50011 message includes the redirect URI the request sent and the application ID it was checked against, so you can see exactly which URL is missing from which app registration.

Fix 1: Register the exact callbacks

Add each callback URL Base44 lists to the provider's allowed redirect URIs. The default one looks like this:

https://app.base44.com/api/apps/<APP_ID>/auth/sso/callback 

Replace <APP_ID> with your own app ID. Then, depending on the provider:

  • Google Workspace: create an OAuth client of type Web application in the Google Cloud console, add the callback under its authorized redirect URIs, and keep the scope in Base44 as openid email profile.
  • Microsoft Entra ID: in the Azure portal, open App registrations, find your app, then go to Authentication and add the URI under Platform configurations. Microsoft says to wait three to five minutes for the change to take effect before you try again.
  • GitHub: set the OAuth app's authorization callback URL to the Base44 callback.
  • Okta: create an OIDC Web application in the Okta Admin Console and register the callback as an allowed redirect URI.
  • Other OIDC providers (Advanced / Manual configuration): register the same callback in the provider's dashboard.

Fix 2: Decide on the custom domain callback

By default, an SSO login runs through app.base44.com even when your app has a custom domain. That's fine for most providers: Base44's docs say Google, Microsoft and Okta work with the default callback.

Turn on Use this app's custom domain as the SSO callback only for providers that require the redirect URI to match your own domain, such as ClassLink, Clever and strict Azure or Entra policies. It's off by default, and you need a verified custom domain on the Domains tab before you can turn it on. When you do, register the custom-domain callback URL with your provider as well, alongside the default one.

Check the fix worked

  • Sign in through SSO from a private window. You should come back to the app signed in.
  • Sign in with an account outside the allowed tenant or audience. It should be refused, as intended.

Stop it coming back

  • Keep the list of registered callbacks in your launch notes. It changes when you add a domain or switch on the custom domain callback.
  • For Microsoft, choose the Tenant ID setting deliberately. Your own directory (tenant) ID lets in only people from your organization, organizations allows any work or school account, and common also allows personal Microsoft accounts.

Questions people ask

Is this the same as the Google login button? No. Base44's built-in Google sign-in is a separate sign-in method. SSO connects your app to a company identity provider through OpenID Connect, and you register your own client with that provider.

Can SSO run on my own domain? Yes, with a verified custom domain and the custom domain callback switched on, plus that callback registered with your provider.

Sources: Base44 docs: Setting up single sign-on for your app, Google: Using OAuth 2.0 for web server applications, Microsoft Learn: Error AADSTS50011, redirect URI mismatch.

The full checklist, with related Base44 fixes, is on our fix page. If you'd like a second pair of eyes, our free AI-built app audit lists what's broken in your code, with the file and line.

I wrote this with AI assistance and reviewed it myself.

原文:https://www.a8q9.cn/en/article/base44-sso-failing-with-redirect-uri-mismatch-or-aadsts50011-register-the-exact--b9a2db.html

相关文章