Add callbackUrl option to OAuth provider config #5375
Closed
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.
☕️ Reasoning
This adds a
callbackUrl
option to OAuth provider configuration.Currently, the OAuth callback URL is inferred from the host from which a user is attempting to sign in. This is problematic for situations like those encountered when using preview deployments on Vercel. If one can't use wildcard characters in a provider's callback URL config, or if one can't create new callback URLs via an API, new callback URLs must be added in a provider's UI for every single preview deployment.
This can be worked around by using a middleman proxy app. So, I could set my callback URL to https://www.authproxy.dev/redirect, and tell Authproxy to redirect to my preview deployment URL which is much easier than setting a new callback URL in an OAuth provider's developer portal.
With this PR, I can set
callbackUrl
to Authproxy (or a similar service) and remove a great deal of tedium from working with OAuth providers and Vercel preview deployments.🧢 Checklist
🎫 Affected issues
Please scout and link issues that might be solved by this PR.
Fixes: INSERT_ISSUE_LINK_HERE
📌 Resources