Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brkalow
Copy link
Member

@brkalow brkalow commented Apr 16, 2025

Description

Fixes an issue where fallbackRedirectUrl and forceRedirectUrl passed to a specific flow would be improperly passed to the other flow in a modal case.

Example:

Clerk.openSignUp({ forceRedirectUrl: '/?form=signup' }) // would apply to sign ins if user clicks sign in in the footer

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:

@brkalow brkalow requested a review from a team April 16, 2025 17:57
@changeset-bot
Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: e509648

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 7:12pm

@brkalow brkalow changed the title fix(clerk-js): disambiguate redirect url options between flows fix(clerk-js): Disambiguate redirect url options between flows Apr 16, 2025
const redirectUrls = new RedirectUrls(
options,
{
...ctx,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this mean that SignInContext and SignUpContext still contain a forceRedirectUrl prop? Can we completely remove any and all usage of forceRedirectUrl except at the component boundary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove from the context, as far as I can tell forceRedirectUrl isn't actually used outside of this assignment in the components, so we should be safe.

@dstaley
Copy link
Member

dstaley commented Apr 16, 2025

would you mind adding a test for the "render sign in modal, click sign up, sign up with existing account" flow with the props specified?

@brkalow
Copy link
Member Author

brkalow commented Apr 16, 2025

@dstaley done!

@brkalow brkalow requested a review from dstaley April 16, 2025 19:24
@brkalow brkalow merged commit de18497 into main Apr 16, 2025
30 checks passed
@brkalow brkalow deleted the brk.fix/disambiguate-redirect-urls branch April 16, 2025 19:37
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.

4 participants