Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/core/src/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ export interface GetTokenParams<R extends boolean = false>
/**
* Takes an Auth.js request (`req`) and returns either the Auth.js issued JWT's payload,
* or the raw JWT string. We look for the JWT in the either the cookies, or the `Authorization` header.
*
* Returns `null` if no JWT is found in the cookies or `Authorization` header, and also when
* the `Authorization` header's Bearer value contains malformed percent-encoding.
*/
export async function getToken<R extends boolean = false>(
params: GetTokenParams<R>
Expand Down
Loading