© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago
capo

Supabase (Self-Hosted) w/ Azure OAuth

Hello,

I'm having a problem I've been dealing with for days figuring out.

selfhosted supabase: https://my.example.com/auth/v1/callback

local react app: http://localhost:5175 (10.10.0.254:5175)

supabase .envs

SITE_URL=http://localhost:5175
ADDITIONAL_REDIRECT_URLS=http://localhost:5175/**

LOGIN METHOD:

const handleMicrosoftLogin = async (event: React.MouseEvent<HTMLButtonElement>) => {
event.preventDefault();
try {
setLoading(true)
setError(null)

const { error } = await supabase.auth.signInWithOAuth({
provider: 'azure',
options: {
scopes: 'openid email profile', },
})

if (error) throw error
} catch (err: any) {
setError(err.message || 'An error occurred during login')
setLoading(false)
}
}

WHAT'S HAPPENING? - i login with oauth (attempt to), i land on https://my.example.com/auth/v1/callback with a ?code and session_state and don't get redirected to localhost:5175 (my local testing app)

works just fine if i use supabase cloud though, i'm beyond fed up with this.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

OAuth Callback on self-hosted supabase
SupabaseSSupabase / help-and-questions
4y ago
Self-Hosted Supabase (Coolify)
SupabaseSSupabase / help-and-questions
2mo ago
Updating supabase self-hosted
SupabaseSSupabase / help-and-questions
13mo ago
Self-hosted supabase works weird
SupabaseSSupabase / help-and-questions
6d ago