feat: Support for OAuth callback proxy #466
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
This addresses a major pain point for hosted Supabase consumers whereby Google et al. OAuth consent screens indicate you're logging into
<gibberish>.supabase.co
, rather than your app.GoTrue/Supabase clients may now optionally supply a "proxy" param that is provided to external providers as the callback, rather than the
GOTRUE_EXTERNAL_<PROVIDER>_REDIRECT_URI
(which is not configurable unless you're self hosting).The proxy end-point is something Supabase consumers implement and lives at their app's domain, and simply redirects back to GoTrue (or rather Kong). It'd make sense to implement this end-point in https://github.com/supabase/auth-helpers so any consumers of those libraries obtain this functionality for free.
SignInWithOAuthCredentials
simply has a new optionalproxy
property which when specified is appended to the generated/authorize
call to GoTrue.What is the current behavior?
Addresses the auth component of supabase/supabase#12429
What is the new behavior?
Additional context
Corresponds with supabase/auth#725