Skip to content

Commit

Permalink
refactor: update maxAge option type check error message
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jun 17, 2024
1 parent d771e0b commit 7fe3454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2939,7 +2939,7 @@ export async function processAuthorizationCodeOpenIDResponse(

if (maxAge !== skipAuthTimeCheck) {
if (typeof maxAge !== 'number' || maxAge < 0) {
throw new TypeError('"options.max_age" must be a non-negative number')
throw new TypeError('"maxAge" must be a non-negative number')
}

const now = epochTime() + getClockSkew(client)
Expand Down Expand Up @@ -3832,7 +3832,7 @@ export async function validateDetachedSignatureResponse(

if (maxAge !== skipAuthTimeCheck) {
if (typeof maxAge !== 'number' || maxAge < 0) {
throw new TypeError('"options.max_age" must be a non-negative number')
throw new TypeError('"maxAge" must be a non-negative number')
}

const now = epochTime() + getClockSkew(client)
Expand Down

0 comments on commit 7fe3454

Please sign in to comment.