Skip to content

fix(clerk-js): preserve trusted clients after satellite sign-out - #10470

Merged
tmilewski merged 6 commits into
mainfrom
tom/satellite-device-trust-investigation
Nov 2, 2026
Merged

tmilewski merged 6 commits into
mainfrom
tom/satellite-device-trust-investigation

Conversation

@tmilewski

@tmilewski tmilewski commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Description

Signing out on a satellite leaves the primary domain holding a stale client cookie. The next primary password sign-in creates a new client and repeats the Device Trust challenge, even though the browser was already trusted.

Uses the optional repair URL from the companion backend change to refresh the primary cookie before continuing sign-out navigation. Repair applies to production browser satellites with client persistence enabled; the backend only offers it when Device Trust is enabled. Disabled persistence and malformed or unsupported destinations use the original removal path, so URL parsing cannot prevent session removal. Navigation errors still propagate.

Preserves the public signOut overloads and zero-argument callback contract. Built-in UI actions retain their original navigation closures and opt in with an internal return URL resolved through the active router. Only a usable backend repair URL replaces that navigation; missing or invalid responses invoke the original callback. Component-internal, hash/virtual, arbitrary customer callback, targeted multisession, primary, development, and native flows retain their existing paths. The transport method remains concrete-only rather than becoming a required ClientResource member.

Part of CORE-4146

Checklist

  • pnpm test runs as expected. Targeted ClerkJS, UI, and router suites passed; the full monorepo suite was not run.
  • pnpm build runs as expected. Browser bundles and relevant typechecks passed; the full monorepo build was not run.
  • (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-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9d01b20

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

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/chrome-extension Patch
@clerk/electron Patch
@clerk/expo Patch
@clerk/mosaic Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/swingset Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue 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

vercel Bot commented Oct 27, 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 Nov 2, 2026 4:47pm UTC
swingset Ready Ready Preview Nov 2, 2026 4:47pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fcbf773 and 9d01b20.

Files selected for processing: 1
  • packages/ui/bundlewatch.config.json
Linked repositories identified

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

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

Walkthrough

The change adds client-side sign-out repair for eligible production satellite redirects. The client request can return a validated HTTPS sign-out URL while retaining response client data. A new UI hook passes eligible destinations to Clerk. Sign-out components use the hook for last-account and all-account flows. Tests cover repair eligibility, fallback behavior, response handling, and navigation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: wobsoriano

Merge Risk: Minimal · up to 9d01b

No actionable merge-blocking risk is identified from the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed 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 with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: preserving trusted clients after satellite sign-out.
Description check Passed The description directly explains the stale-cookie issue, repair flow, scope, fallback behavior, and validation status for the changeset.
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 with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 21 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10470

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 9d01b20

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-02T16:50:25.001Z

Summary

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

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.43.1
Recommended bump: MINOR → 4.44.0

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: SignOutOptions
  type SignOutOptions = {
+   __internal_satelliteSignOutRedirectUrl?: string;
    sessionId?: string;
    redirectUrl?: string;
  };

Static analyzer: Breaking change in type alias SignOutOptions: Type changed: {sessionId?:string;redirectUrl?:string;} → {__internal_satelliteSignOutRedirectUrl?:string;sessionId?:string;redirectUrl?:string;}

🤖 AI review (reclassified as non-breaking) (95%): A new optional property __internal_satelliteSignOutRedirectUrl? was added to SignOutOptions, which is used only as an optional input parameter to SignOut; existing callers who omit or spread this type are unaffected because optional additions to input types are non-breaking per rule 9.


Report generated by Break Check

Last ran on 9d01b20.

Comment thread packages/shared/src/types/clerk.ts Resolved
Satellite sign-out could fail before removing sessions when its destination was malformed, and deliberately discarded clients took an unnecessary trip through the primary. Use the original removal and navigation paths for unsupported destinations and disabled client persistence, preserving callback and navigation error behavior.

Part of CORE-4146
@tmilewski
tmilewski merged commit 917748a into main Nov 2, 2026
58 checks passed
@tmilewski
tmilewski deleted the tom/satellite-device-trust-investigation branch November 2, 2026 22:30

This branch was successfully deployed

2 active deployments
Preview – swingset — 9d01b201 Deployed Nov 2, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 9d01b201 Deployed Nov 2, 2026 by vercel[bot]
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