-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(auth): Add ExtraQueryParams to AuthSignInWithRedirectInput #13892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auth): Add ExtraQueryParams to AuthSignInWithRedirectInput #13892
Conversation
33ba1ca to
2767ac3
Compare
|
We've also run into an issue with this on our team, are there any temporary workarounds that can be used while this PR is in review? |
|
hey @sarossilli thanks for your contribution. We've looked at this PR and in combination with a bunch of other requirements (from us and other contributors) to For context: signInWithRedirect({
provider: {
custom: "TwitchOIDC",
},
options: {
authSessionOpener: async (href) => {
const url = new URL(href);
url.searchParams.append('claims', 'test');
window.location.href = url.toString()
}
}
})I hope this helps. Now, since the desired outcome can be achieved with an existing approach, I will close this Pull Request. Feel free to leave comments or reopen in case you feel strongly about the implementation and I'm happy to discuss this further. Nothing really speaks against a two-option solution. P.S.: @wildjames this solution, I presume, will help you most probably as well. |
Description of changes
Adding
extraQueryParamstoAuthSignInWithRedirectInput.Adding paramters from
extraQueryParamstoqueryStringofoAuthUrlThis will allow users to define extra 'custom' query parameters to the
/authorizeurl for custom ODIC auth providers.Issue #, if available
Feature Request: #13861
Description of how you validated changes
yarn testpassesBuilt and linked local changes using
yarn linkRan test app with linked local changes.
Validated authorization url now contains new custom-added parameters when calling
signInIWithRedirect.Example usage:
And
/authorizeURL query params are:Checklist
yarn testpassesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.