Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(auth): clarify local OAuth callback URLs for Azure, Google, and LinkedIn (#41892)

Muzzaiyyan Hussain5f4fb17a182c
diff --git a/apps/docs/content/_partials/social_provider_setup.mdx b/apps/docs/content/_partials/social_provider_setup.mdx
index 74b1d3423ae..399d31eda57 100644
--- a/apps/docs/content/_partials/social_provider_setup.mdx
+++ b/apps/docs/content/_partials/social_provider_setup.mdx
@@ -7,6 +7,17 @@ The next step requires a callback URL, which looks like this: `https://<project-
<Admonition type="note">
+#### Local development
+
+When testing OAuth locally with the Supabase CLI, ensure your OAuth provider
+is configured with the local Supabase Auth callback URL:
+
+http://localhost:54321/auth/v1/callback
+
+If this callback URL is missing or misconfigured, OAuth sign-in may fail or not redirect correctly during local development.
+
+See the [local development docs](/docs/guides/local-development) for more details.
+
For testing OAuth locally with the Supabase CLI see the [local development docs](/docs/guides/local-development).
</Admonition>
diff --git a/apps/docs/content/guides/auth/social-login/auth-azure.mdx b/apps/docs/content/guides/auth/social-login/auth-azure.mdx
index 9967206d72d..8622f47f4a7 100644
--- a/apps/docs/content/guides/auth/social-login/auth-azure.mdx
+++ b/apps/docs/content/guides/auth/social-login/auth-azure.mdx
@@ -31,6 +31,19 @@ Setting up OAuth with Azure consists of four broad steps:
## Obtain a client ID and secret
+### Local development with Azure OAuth
+
+Azure does not allow `127.0.0.1` as a redirect URI hostname and requires
+the use of `localhost`.
+
+To enable Azure OAuth during local Supabase development, configure the
+Supabase API external URL in your `config.toml`:
+
+```toml
+[api]
+external_url = "http://localhost:54321"
+```
+
- Once your app has been registered, the client ID can be found under the [list of app registrations](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) under the column titled _Application (client) ID_.
- You can also find it in the app overview screen.
- Place the Client ID in the Azure configuration screen in the Supabase Auth dashboard.
diff --git a/apps/docs/content/guides/auth/social-login/auth-google.mdx b/apps/docs/content/guides/auth/social-login/auth-google.mdx
index 339aaa3fd81..dd263a17e98 100644
--- a/apps/docs/content/guides/auth/social-login/auth-google.mdx
+++ b/apps/docs/content/guides/auth/social-login/auth-google.mdx
@@ -67,7 +67,7 @@ Regardless of whether you use application code or Google's pre-built solutions t
- Add `http://localhost:<port>` while developing locally. Remember to remove this when your application [goes into production](/docs/guides/deployment/going-into-prod).
1. Under **Authorized redirect URIs** add your Supabase project's callback URL.
- Access it from the [Google provider page on the Dashboard](/dashboard/project/_/auth/providers?provider=Google).
- - For local development, use `http://localhost:3000/auth/v1/callback`.
+ - For local development, use `http://127.0.0.1:54321/auth/v1/callback`.
1. Click `Create` and make sure you save the Client ID and Client Secret.
- Add these values to the [Google provider page on the Dashboard](/dashboard/project/_/auth/providers?provider=Google).