Clerk: Session token from cookie is missing the azp claim. In a future version of Clerk, this token will be considered invalid. Please contact Clerk support if you see this warning.
@jacekradko がすでに取り組んでいます。
2026年5月28日 から。
評価
この issue はまだ評価されていません。
説明
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://platform.ultralytics.com
Publishable key
pk_test_ZGl2aW5lLWZveGhvdW5kLTIyLmNsZXJrLmFjY291bnRzLmRldiQ
Description
Bug: Cookie-based session tokens missing azp claim after upgrading to @clerk/nextjs v7
Environment
@clerk/nextjs: 7.0.8@clerk/backend: 3.2.4- Framework: Next.js 16.2 (App Router)
- Deployment: Vercel (Production)
- Node.js runtime: Vercel serverless
Description
After upgrading from @clerk/nextjs v6 (^6.38.0) to v7 (^7.0.8), every authenticated API request produces the following warning in Vercel serverless function logs:
Clerk: Session token from cookie is missing the azp claim. In a future version of Clerk, this token will be considered invalid. Please contact Clerk support if you see this warning.
This is fires on authenticated requests (~2,000+ warnings/day in production). The warning originates from @clerk/backend@3.2.4 (dist/internal.js:6428), added in clerk/javascript#7929:
const { data, errors } = await verifyToken(authenticateContext.sessionTokenInCookie, authenticateContext);
if (errors) {
throw errors[0];
}
if (!data.azp) {
console.warn(
"Clerk: Session token from cookie is missing the azp claim. In a future version of Clerk, this token will be considered invalid. Please contact Clerk support if you see this warning."
);
}
Setup
We run a multi-app monorepo on *.ultralytics.com with cross-subdomain SSO:
account.ultralytics.com— primary auth domainplatform.ultralytics.com— SaaS app (where all warnings appear)portal.ultralytics.com,docs.ultralytics.com,academy.ultralytics.com,handbook.ultralytics.com
Sessions are shared across subdomains via the __client cookie. Each app's middleware correctly passes authorizedParties to clerkMiddleware():
const clerkHandler = clerkMiddleware(
async (auth, req) => {
// route protection logic
},
(req) => ({
authorizedParties: getClerkAllowedOrigins(
req.nextUrl.origin,
process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : undefined,
),
}),
);
Where getClerkAllowedOrigins() returns all production origins (https://account.ultralytics.com, https://platform.ultralytics.com, etc.) plus localhost for development.
What we've verified
authorizedPartiesis correctly configured in all 6 apps'proxy.tsmiddleware — this is not a missing configuration issue- We are on the latest stable versions — no newer fix available
- The
azpclaim is a Clerk default claim set by the Frontend API based on the browserOriginheader — it is not configurable via JWT templates or code - Auth still works — tokens are accepted, users stay signed in. The warning is non-breaking today, but #7332 indicates Clerk plans to make this a hard error in a future version
Expected behavior
Cookie-based session tokens issued by Clerk's Frontend API should include the azp claim, populated from the browser's Origin header. No warning should appear when authorizedParties is correctly configured and sessions are accessed from known origins.
Actual behavior
Cookie-based session tokens on platform.ultralytics.com are missing the azp claim, producing a console.warn on authenticated requests. This floods production logs and makes them unusable for real debugging.
Questions
- Why are tokens issued by the Frontend API missing the
azpclaim in this cross-subdomain SSO configuration? - Is there a configuration change needed on our end (Clerk Dashboard, environment variables, SDK options) to ensure
azpis populated? - What is the timeline for
azpbecoming a hard requirement (per #7332)?
Environment
(.venv) glennjocher@Glenns-MacBook-Pro portal % pnpm dlx envinfo --system --browsers --binaries --npmPackages
WARN The "workspaces" field in package.json is not supported by pnpm. Create a "pnpm-workspace.yaml" file instead.
Packages: +1
+
Progress: resolved 1, reused 0, downloaded 1, added 1, done
System:
OS: macOS 26.4
CPU: (12) arm64 Apple M4 Pro
Memory: 432.34 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 25.2.1 - /opt/homebrew/bin/node
npm: 11.6.2 - /opt/homebrew/bin/npm
bun: 1.3.11 - /Users/glennjocher/.bun/bin/bun
Browsers:
Chrome: 146.0.7680.178
Firefox: 149.0
Safari: 26.4
npmPackages:
@biomejs/biome: ^2.4.10 => 2.4.10
@next/third-parties: ^16.2.2 => 16.2.2
knip: ^6.3.0 => 6.3.0
next: ^16.2.2 => 16.2.2
svix: ^1.90.0 => 1.90.0
turbo: ^2.9.3 => 2.9.3
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 472
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 222
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clerk/javascript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
clerk/javascript#9611 · コメント 1 件 ·
-
clerk/javascript#9891 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
clerk/javascript#9775 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
clerk/javascript#9770 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
clerk/javascript#9667 · コメント 1 件 ·
clerk/javascript の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100