You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. #8231
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.
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/[email protected] (dist/internal.js:6428), added in clerk/javascript#7929:
const{ data, errors }=awaitverifyToken(authenticateContext.sessionTokenInCookie,authenticateContext);if(errors){throwerrors[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 domain
platform.ultralytics.com — SaaS app (where all warnings appear)
Where getClerkAllowedOrigins() returns all production origins (https://account.ultralytics.com, https://platform.ultralytics.com, etc.) plus localhost for development.
What we've verified
authorizedParties is correctly configured in all 6 apps' proxy.ts middleware — this is not a missing configuration issue
We are on the latest stable versions — no newer fix available
The azp claim is a Clerk default claim set by the Frontend API based on the browser Origin header — 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 azp claim in this cross-subdomain SSO configuration?
Is there a configuration change needed on our end (Clerk Dashboard, environment variables, SDK options) to ensure azp is populated?
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
azpclaim after upgrading to@clerk/nextjsv7Environment
@clerk/nextjs: 7.0.8@clerk/backend: 3.2.4Description
After upgrading from
@clerk/nextjsv6 (^6.38.0) to v7 (^7.0.8), every authenticated API request produces the following warning in Vercel serverless function logs:This is fires on authenticated requests (~2,000+ warnings/day in production). The warning originates from
@clerk/[email protected](dist/internal.js:6428), added in clerk/javascript#7929:Setup
We run a multi-app monorepo on
*.ultralytics.comwith 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.comSessions are shared across subdomains via the
__clientcookie. Each app's middleware correctly passesauthorizedPartiestoclerkMiddleware():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 issueazpclaim is a Clerk default claim set by the Frontend API based on the browserOriginheader — it is not configurable via JWT templates or codeExpected behavior
Cookie-based session tokens issued by Clerk's Frontend API should include the
azpclaim, populated from the browser'sOriginheader. No warning should appear whenauthorizedPartiesis correctly configured and sessions are accessed from known origins.Actual behavior
Cookie-based session tokens on
platform.ultralytics.comare missing theazpclaim, producing aconsole.warnon authenticated requests. This floods production logs and makes them unusable for real debugging.Questions
azpclaim in this cross-subdomain SSO configuration?azpis populated?azpbecoming a hard requirement (per feat(backend): Error if azp is missing on a cookie-based token #7332)?Environment