Solution skill
Auth data is not present on serverside - NextJS App Router
Complete solution
Shows how to fix auth data is not present on serverside - NextJS App Router. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Fix: do not send unrelated Authorization headers to Clerk-protected routes, or ensure the header carries a valid Clerk JWT.
Steps
- Contributor jescalan (after the reporter contacted support): the requests carried an Authorization header that did not contain a Clerk JWT. Clerk treats a present Authorization header as the auth token, so verification fails and auth() returns null. Fix: do not send unrelated Authorization headers to Clerk-protected routes, or ensure the header carries a valid Clerk JWT.
When to use
You are seeing this: auth() and currentUser() return null on the server side in the Next.js App Router, even though the user is signed in client-side. Use this skill when you run into "Auth data is not present on serverside - NextJS App Router".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In gh:clerk/javascript#1528 (https://github.com/clerk/javascript/issues/1528), the question was: auth() and currentUser() return null on the server side in the Next.js App Router, even though the user is signed in client-side. The verified resolution: Contributor jescalan (after the reporter contacted support): the requests carried an Authorization header that did not contain a Clerk JWT. Clerk treats a present Authorization header as the auth token, so verification fails and auth() returns null.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Q6mvlpugipLjTOZ6_tk_lg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Auth data is not present on serverside - NextJS App Router <span>— Vectle</span></a>