Skip to content

Conversation

@wobsoriano
Copy link
Member

@wobsoriano wobsoriano commented Jan 7, 2026

Description

Builds on top of #7527

When using acceptsToken as an array (e.g., ['session_token', 'api_key']) with the clerkClient.authenticateRequest(), the request was incorrectly being rejected (token-type-mismatch) even when the token type matched one of the accepted types.

The higher-level SDK helpers (auth(), getAuth()) correctly handle array acceptsToken via the getAuthObjectForAcceptedToken helper. However, developers who use the underlying authenticateRequest function had a bug in its routing logic.

Fixes #7520

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
Copy link

vercel bot commented Jan 7, 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 7, 2026 10:59pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 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.

@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 989104d

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

This PR includes changesets to release 11 packages
Name Type
@clerk/backend Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing 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
Copy link

pkg-pr-new bot commented Jan 7, 2026

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

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

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

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

@clerk/types

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

@clerk/upgrade

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

@clerk/vue

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

commit: 989104d

@wobsoriano wobsoriano enabled auto-merge (squash) January 7, 2026 23:06
@wobsoriano wobsoriano merged commit 6b26afc into release/core-2 Jan 7, 2026
44 checks passed
@wobsoriano wobsoriano deleted the rob/fix-array-of-token-types branch January 7, 2026 23:06
@wobsoriano
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @wobsoriano - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.2.14-snapshot.v20260108010246
@clerk/astro 2.16.12-snapshot.v20260108010246
@clerk/backend 2.29.2-snapshot.v20260108010246
@clerk/chrome-extension 2.8.16-snapshot.v20260108010246
@clerk/clerk-js 5.119.0-snapshot.v20260108010246
@clerk/clerk-expo 2.19.16-snapshot.v20260108010246
@clerk/express 1.7.62-snapshot.v20260108010246
@clerk/fastify 2.6.14-snapshot.v20260108010246
@clerk/nextjs 6.36.7-snapshot.v20260108010246
@clerk/nuxt 1.13.12-snapshot.v20260108010246
@clerk/react-router 2.3.9-snapshot.v20260108010246
@clerk/remix 4.13.29-snapshot.v20260108010246
@clerk/tanstack-react-start 0.27.14-snapshot.v20260108010246
@clerk/testing 1.13.28-snapshot.v20260108010246

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-react-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

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