Skip to content

fix(ui): clear the invitation ticket when a sign-in completes on a challenge - #9621

Open
zourzouvillys wants to merge 1 commit into
theo/resume-enterprise-sso-after-challengefrom
theo/ticket-param-after-challenge
Open

zourzouvillys wants to merge 1 commit into
theo/resume-enterprise-sso-after-challengefrom
theo/ticket-param-after-challenge

Conversation

@zourzouvillys

Copy link
Copy Markdown
Contributor

Description

Stacked on #9620 — review the delta only; that one merges first.

A sign-in started from an organization invitation clears the ticket from the URL when it completes. If a verification challenge is required, the sign-in completes on the challenge instead, which did not clear it — so the ticket stayed in the address bar afterwards.

Clear it there too, matching what the start page and the sign-up flow already do.

Effects and risks

  • removeClerkQueryParam is a no-op when the parameter is absent, so this only affects the ticket case.
  • Only covers a sign-in that completes on the challenge itself. One that continues to another step and completes there keeps the parameter, as it does today without a challenge — unchanged here.

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:

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Sep 23, 2026 11:37pm UTC
swingset Ready Ready Preview Sep 23, 2026 11:37pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b5ad1b

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension 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

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9621

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9621

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9621

@clerk/expo

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9621

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@9621

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 5b5ad1b

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-09-23T23:39:37.047Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 5b5ad1b.

@zourzouvillys
zourzouvillys force-pushed the theo/ticket-param-after-challenge branch from 31e46ed to 17bed3d Compare September 23, 2026 07:02
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: 4ff39fb5-679e-4660-9bb3-4c2994fed394

📥 Commits

Reviewing files that changed from the base of the PR and between 74c0386 and 5b5ad1b.

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Team

Run ID: 1941503d-f128-446a-b7c3-63af0d4b1915

📥 Commits

Reviewing files that changed from the base of the PR and between ac7b8e4 and 17bed3d.

📒 Files selected for processing (3)
  • .changeset/clear-ticket-after-challenge.md
  • packages/ui/src/components/SignIn/SignInProtectCheck.tsx
  • packages/ui/src/components/SignIn/__tests__/SignInProtectCheck.test.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/cli (auto-detected)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)

Included review availability: 8 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.


📝 Walkthrough

Walkthrough

When a Protect Check sign-in completes with a created session, SignInProtectCheckInternal removes the __clerk_ticket query parameter before activating the session. A test verifies the parameter is cleared after clerk.setActive is called. A patch changeset records the update for @clerk/ui.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 17bed

Challenge-completed invitation sign-ins clear the ticket from the URL, matching the existing sign-in flow. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: clearing the invitation ticket when sign-in completes on a verification challenge.
Description check ✅ Passed The description directly explains the bug, the affected flow, the implemented fix, scope, risks, and test status.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

…allenge

A ticket sign-in that would have completed on the start page completes
on the challenge instead, which did not clear the ticket from the URL.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – swingset 5b5ad1b4 Deployed Sep 23, 2026 by vercel[bot]
Preview – clerk-js-sandbox 5b5ad1b4 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to 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.

2 participants