Skip to content

fix(core): document that getToken returns null for malformed authorization headers#13467

Merged
gustavovalverde merged 1 commit into
mainfrom
fix/core-gettoken-null-jsdoc
Jul 20, 2026
Merged

fix(core): document that getToken returns null for malformed authorization headers#13467
gustavovalverde merged 1 commit into
mainfrom
fix/core-gettoken-null-jsdoc

Conversation

@gustavovalverde

Copy link
Copy Markdown
Collaborator

getToken() returns null when the token is missing or unusable, including when the Authorization header's Bearer value contains malformed percent-encoding, but the JSDoc did not state the null contract. Callers checking the return value have no documented guarantee to rely on. This documents it.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auth-docs Ready Ready Preview, Comment Jul 20, 2026 9:13pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
next-auth-docs Ignored Ignored Preview Jul 20, 2026 9:13pm
proxy Ignored Ignored Jul 20, 2026 9:13pm

Request Review

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.85%. Comparing base (5b1aa47) to head (8afdfec).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13467   +/-   ##
=======================================
  Coverage   49.85%   49.85%           
=======================================
  Files         200      200           
  Lines       13487    13487           
  Branches     1445     1445           
=======================================
  Hits         6724     6724           
  Misses       6763     6763           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gustavovalverde
gustavovalverde force-pushed the fix/core-gettoken-null-jsdoc branch from 803e702 to 8afdfec Compare July 20, 2026 21:07
@gustavovalverde
gustavovalverde merged commit 8a933f9 into main Jul 20, 2026
11 checks passed
@gustavovalverde
gustavovalverde deleted the fix/core-gettoken-null-jsdoc branch July 20, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Refers to `@auth/core`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant