Skip to content

Commit 5f4fb17

Browse files
docs(auth): clarify local OAuth callback URLs for Azure, Google, and LinkedIn (supabase#41892)
* docs(auth): clarify local OAuth callback URLs for Azure, Google, and LinkedIn * docs: add local OAuth callback instructions to shared social provider setup
1 parent 8aeb049 commit 5f4fb17

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

apps/docs/content/_partials/social_provider_setup.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ The next step requires a callback URL, which looks like this: `https://<project-
77

88
<Admonition type="note">
99

10+
#### Local development
11+
12+
When testing OAuth locally with the Supabase CLI, ensure your OAuth provider
13+
is configured with the local Supabase Auth callback URL:
14+
15+
http://localhost:54321/auth/v1/callback
16+
17+
If this callback URL is missing or misconfigured, OAuth sign-in may fail or not redirect correctly during local development.
18+
19+
See the [local development docs](/docs/guides/local-development) for more details.
20+
1021
For testing OAuth locally with the Supabase CLI see the [local development docs](/docs/guides/local-development).
1122

1223
</Admonition>

apps/docs/content/guides/auth/social-login/auth-azure.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ Setting up OAuth with Azure consists of four broad steps:
3131

3232
## Obtain a client ID and secret
3333

34+
### Local development with Azure OAuth
35+
36+
Azure does not allow `127.0.0.1` as a redirect URI hostname and requires
37+
the use of `localhost`.
38+
39+
To enable Azure OAuth during local Supabase development, configure the
40+
Supabase API external URL in your `config.toml`:
41+
42+
```toml
43+
[api]
44+
external_url = "http://localhost:54321"
45+
```
46+
3447
- 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_.
3548
- You can also find it in the app overview screen.
3649
- Place the Client ID in the Azure configuration screen in the Supabase Auth dashboard.

apps/docs/content/guides/auth/social-login/auth-google.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Regardless of whether you use application code or Google's pre-built solutions t
6767
- Add `http://localhost:<port>` while developing locally. Remember to remove this when your application [goes into production](/docs/guides/deployment/going-into-prod).
6868
1. Under **Authorized redirect URIs** add your Supabase project's callback URL.
6969
- Access it from the [Google provider page on the Dashboard](/dashboard/project/_/auth/providers?provider=Google).
70-
- For local development, use `http://localhost:3000/auth/v1/callback`.
70+
- For local development, use `http://127.0.0.1:54321/auth/v1/callback`.
7171
1. Click `Create` and make sure you save the Client ID and Client Secret.
7272
- Add these values to the [Google provider page on the Dashboard](/dashboard/project/_/auth/providers?provider=Google).
7373

0 commit comments

Comments
 (0)