Skip to content

fix(clerk-js): include ticket strategy in future helpers - #8641

Merged
wobsoriano merged 3 commits into
mainfrom
jw/fix-future-ticket-params
May 26, 2026
Merged

fix(clerk-js): include ticket strategy in future helpers#8641
wobsoriano merged 3 commits into
mainfrom
jw/fix-future-ticket-params

Conversation

@jeremy-clerk

@jeremy-clerkjeremy-clerk commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes#8219.

signIn.ticket() and signUp.ticket() were only sending ticket to FAPI. Ticket flows need strategy: 'ticket' as well, otherwise the request succeeds but the ticket is not applied.

This updates the Core 3 future helpers to send the same shape the prebuilt UI already uses.

Verified with:

  • pnpm exec vitest run src/core/resources/__tests__/SignIn.test.ts src/core/resources/__tests__/SignUp.test.ts
  • pnpm exec vitest run src/core/resources/__tests__/SignIn.test.ts -t "resetPassword|ResetPassword"

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:

@changeset-bot

changeset-botBot commented May 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5625dc3

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

This PR includes changesets to release 3 packages
NameType
@clerk/clerk-jsPatch
@clerk/chrome-extensionPatch
@clerk/expoPatch

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

vercelBot commented May 25, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreview, CommentMay 26, 2026 2:42pm

Request Review

@coderabbitai

coderabbitaiBot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds explicit strategy: 'ticket' parameter passing to the ticket-based sign-in and sign-up helpers in @clerk/clerk-js. The SignInFuture.ticket() and SignUpFuture.ticket() methods now pass both strategy: 'ticket' and the ticket value to their respective create() calls, replacing the prior behavior of only forwarding the ticket field. The test suites are updated to verify this behavior across multiple scenarios, including query-parameter-derived tickets, explicitly provided tickets, and edge cases where an alternate strategy is overridden. A changeset documents the patch-level update.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Description check✅ PassedThe pull request description clearly relates to the changeset, explaining the bug fix of adding the missing strategy field to ticket() methods.
Title check✅ PassedThe title accurately reflects the main change: explicitly including the ticket strategy parameter in the SignIn and SignUp future helpers.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@pkg-pr-new

pkg-pr-newBot commented May 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8641

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8641

@clerk/upgrade

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

@clerk/vue

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

commit: 5625dc3

@wobsorianowobsoriano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks legit to me and minimal. In validateAndRetrieveStrategy (FAPI sign-in service), when strategy is nil and no password is present, it returns nil immediately and the ticket param is never read. Ticket requires to be explicit.

The prebuilt UI has it right (SignInStart)

cc @dstaley

@dstaleydstaley changed the title fix(js): include ticket strategy in future helpersfix(clerk-s): include ticket strategy in future helpersMay 26, 2026
@wobsorianowobsoriano changed the title fix(clerk-s): include ticket strategy in future helpersfix(clerk-js): include ticket strategy in future helpersMay 26, 2026
@jeremy-clerk

Copy link
Copy Markdown
ContributorAuthor

@wobsoriano or @dstaley can you merge this for me when ready, I don't have perms 🙏

@wobsoriano
wobsoriano merged commit db3993b into mainMay 26, 2026
44 of 45 checks passed
@wobsoriano
wobsoriano deleted the jw/fix-future-ticket-params branch May 26, 2026 15:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

signIn.ticket() doesn't complete sign-in for sign-in tokens (status stays at needs_identifier)

3 participants

@jeremy-clerk@dstaley@wobsoriano