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. I acknowledge that the change to the docs is not ideal; it makes the code example much longer. But, my thinking is to first: make it correct, second: make SDK improvements that could reduce the burden on customers.

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: 276a2cb

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 26, 2026 4:57pm

Request Review

@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 review from a team, BrandonRomano and nikosdouvlis January 14, 2026 19:12
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 26, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7600

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7600

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7600

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7600

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7600

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7600

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@7600

@clerk/clerk-expo

npm i https://pkg.pr.new/@clerk/clerk-expo@7600

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7600

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7600

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7600

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7600

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7600

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7600

@clerk/clerk-react

npm i https://pkg.pr.new/@clerk/clerk-react@7600

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7600

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@7600

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7600

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7600

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7600

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@7600

@clerk/types

npm i https://pkg.pr.new/@clerk/types@7600

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7600

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7600

commit: 276a2cb

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.

3 participants