@simplewebauthn/server
Advanced tools
Comparing version 8.0.1 to 8.1.0
@@ -5,3 +5,3 @@ import type { AuthenticationResponseJSON, AuthenticatorDevice, CredentialDeviceType, UserVerificationRequirement } from '../deps.js'; | ||
response: AuthenticationResponseJSON; | ||
expectedChallenge: string | ((challenge: string) => boolean); | ||
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>); | ||
expectedOrigin: string | string[]; | ||
@@ -8,0 +8,0 @@ expectedRPID: string | string[]; |
@@ -56,3 +56,3 @@ import { decodeClientDataJSON } from '../helpers/decodeClientDataJSON.js'; | ||
if (typeof expectedChallenge === 'function') { | ||
if (!expectedChallenge(challenge)) { | ||
if (!(await expectedChallenge(challenge))) { | ||
throw new Error(`Custom challenge verifier returned false for registration response challenge "${challenge}"`); | ||
@@ -59,0 +59,0 @@ } |
@@ -6,3 +6,3 @@ import type { COSEAlgorithmIdentifier, CredentialDeviceType, RegistrationResponseJSON } from '../deps.js'; | ||
response: RegistrationResponseJSON; | ||
expectedChallenge: string | ((challenge: string) => boolean); | ||
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>); | ||
expectedOrigin: string | string[]; | ||
@@ -9,0 +9,0 @@ expectedRPID?: string | string[]; |
@@ -57,3 +57,3 @@ import { decodeAttestationObject, } from '../helpers/decodeAttestationObject.js'; | ||
if (typeof expectedChallenge === 'function') { | ||
if (!expectedChallenge(challenge)) { | ||
if (!(await expectedChallenge(challenge))) { | ||
throw new Error(`Custom challenge verifier returned false for registration response challenge "${challenge}"`); | ||
@@ -60,0 +60,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"name": "@simplewebauthn/server", | ||
"version": "8.0.1", | ||
"version": "8.1.0", | ||
"description": "SimpleWebAuthn for Servers", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -5,3 +5,3 @@ import type { AuthenticationResponseJSON, AuthenticatorDevice, CredentialDeviceType, UserVerificationRequirement } from '../deps.js'; | ||
response: AuthenticationResponseJSON; | ||
expectedChallenge: string | ((challenge: string) => boolean); | ||
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>); | ||
expectedOrigin: string | string[]; | ||
@@ -8,0 +8,0 @@ expectedRPID: string | string[]; |
@@ -59,3 +59,3 @@ "use strict"; | ||
if (typeof expectedChallenge === 'function') { | ||
if (!expectedChallenge(challenge)) { | ||
if (!(await expectedChallenge(challenge))) { | ||
throw new Error(`Custom challenge verifier returned false for registration response challenge "${challenge}"`); | ||
@@ -62,0 +62,0 @@ } |
@@ -6,3 +6,3 @@ import type { COSEAlgorithmIdentifier, CredentialDeviceType, RegistrationResponseJSON } from '../deps.js'; | ||
response: RegistrationResponseJSON; | ||
expectedChallenge: string | ((challenge: string) => boolean); | ||
expectedChallenge: string | ((challenge: string) => boolean | Promise<boolean>); | ||
expectedOrigin: string | string[]; | ||
@@ -9,0 +9,0 @@ expectedRPID?: string | string[]; |
@@ -60,3 +60,3 @@ "use strict"; | ||
if (typeof expectedChallenge === 'function') { | ||
if (!expectedChallenge(challenge)) { | ||
if (!(await expectedChallenge(challenge))) { | ||
throw new Error(`Custom challenge verifier returned false for registration response challenge "${challenge}"`); | ||
@@ -63,0 +63,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
460372