Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sarossilli
Copy link

Description of changes

Adding extraQueryParams to AuthSignInWithRedirectInput.

Adding paramters from extraQueryParams to queryString of oAuthUrl

This will allow users to define extra 'custom' query parameters to the /authorize url for custom ODIC auth providers.

Issue #, if available

Feature Request: #13861

Description of how you validated changes

yarn test passes

Built and linked local changes using yarn link

Ran test app with linked local changes.

Validated authorization url now contains new custom-added parameters when calling signInIWithRedirect.

Example usage:

        signInWithRedirect({
            provider: {
                custom: "TwitchOIDC",
            },
            extraQueryParams: {
                claims: 'test'
            }
        })

And /authorize URL query params are:

redirect_uri=[uri]
&response_type=code
&client_id=[id]&identity_provider=TwitchOIDC
&scope=[scope]&state=[state]&code_challenge=[uuid]
&code_challenge_method=S256
&claims=test

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sarossilli sarossilli force-pushed the feat/query-params-authorization-url branch from 33ba1ca to 2767ac3 Compare October 5, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category external-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants