Skip to content

Conversation

@jfoshee
Copy link
Contributor

@jfoshee jfoshee commented Jan 14, 2026

so that component AuthenticateWithRedirectCallback automatically incorporates any redirects in the current query to match the documented usage

Part of USER-4308

Without a fix like this the developer must manually snag and specify all the possible redirects, which I think is not the intent of the component.

const redirectUrl = searchParams.get('redirect_url') ?? undefined
const signInFallbackRedirectUrl = searchParams.get('sign_in_fallback_redirect_url') ?? undefined
const signInForceRedirectUrl = searchParams.get('sign_in_force_redirect_url') ?? undefined
const signUpFallbackRedirectUrl = searchParams.get('sign_up_fallback_redirect_url') ?? undefined
const signUpForceRedirectUrl = searchParams.get('sign_up_force_redirect_url') ?? undefined
       <AuthenticateWithRedirectCallback
              continueSignUpUrl={buildContinueSignUpUrl()}
              redirectUrl={redirectUrl}
              signInFallbackRedirectUrl={signInFallbackRedirectUrl}
              signInForceRedirectUrl={signInForceRedirectUrl}
              signUpFallbackRedirectUrl={signUpFallbackRedirectUrl}
              signUpForceRedirectUrl={signUpForceRedirectUrl}
            />

Note to Reviewers

Is this the best place to insert the URL's query params? It could be done at a higher level, e.g. adding an argument to handleRedirectCallback. Are there scenarios where it is undesirable to automatically use the window's current query?

What are some scenarios I should manually test?

It would be helpful to consider this change in conjunction with this docs change.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

…ack`

so that component `AuthenticateWithRedirectCallback` automatically incorporates any redirects in the current query
to match the documented usage
https://clerk.com/docs/guides/development/custom-flows/authentication/oauth-connections
@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

⚠️ No Changeset found

Latest commit: cea6727

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 14, 2026 6:40pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@jfoshee jfoshee changed the title feat(clerk-js): include current search params in handleRedirectCallback feat(clerk-js): Include current search params in handleRedirectCallback Jan 14, 2026
@jfoshee jfoshee requested review from brkalow and dstaley January 14, 2026 19:11
@jfoshee jfoshee marked this pull request as ready for review January 14, 2026 19:11
@jfoshee jfoshee requested a review from nikosdouvlis January 14, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants