@1auth/authn-webauthn
Advanced tools
Comparing version 0.0.0-alpha.38 to 0.0.0-alpha.39
36
index.js
@@ -234,10 +234,9 @@ import { | ||
const secret = await generateRegistrationOptions(registrationOptions) | ||
const { id } = await authnCreate(options.token, sub, { | ||
value: { | ||
expectedChallenge: secret.challenge, | ||
expectedOrigin: options.origin, | ||
expectedRPID: new URL(options.origin).hostname, | ||
requireUserVerification: true // PassKey | ||
} | ||
}) | ||
const value = { | ||
expectedChallenge: secret.challenge, | ||
expectedOrigin: options.origin, | ||
expectedRPID: new URL(options.origin).hostname, | ||
requireUserVerification: true // PassKey | ||
} | ||
const { id } = await authnCreate(options.token, sub, { value }) | ||
@@ -247,3 +246,3 @@ if (options.log) { | ||
'@1auth/authn-webauthn createToken return', | ||
JSON.stringify(secret, null, 2) | ||
JSON.stringify({ id, secret }, null, 2) | ||
) | ||
@@ -299,12 +298,13 @@ } | ||
const authenticator = options.secret.decode(credential.value) | ||
const value = { | ||
authenticator, | ||
expectedChallenge: secret.challenge, | ||
expectedOrigin: options.origin, | ||
expectedRPID: new URL(options.origin).hostname, | ||
requireUserVerification: true // PassKey | ||
} | ||
challenges.push( | ||
authnCreate(options.challenge, sub, { | ||
sourceId: credential.id, | ||
value: { | ||
authenticator, | ||
expectedChallenge: secret.challenge, | ||
expectedOrigin: options.origin, | ||
expectedRPID: new URL(options.origin).hostname, | ||
requireUserVerification: true // PassKey | ||
}, | ||
value, | ||
update: now | ||
@@ -340,3 +340,3 @@ }) | ||
// value.credentialID = credentialNormalize(value.credentialID); | ||
value.credentialPublicKey = credentialNormalize(value.credentialPublicKey) | ||
value.credential.publicKey = credentialNormalize(value.credential.publicKey) | ||
value.attestationObject = credentialNormalize(value.attestationObject) | ||
@@ -348,3 +348,3 @@ return value | ||
// value.credentialID = credentialBuffer(value.credentialID); | ||
value.credentialPublicKey = credentialBuffer(value.credentialPublicKey) | ||
value.credential.publicKey = credentialBuffer(value.credential.publicKey) | ||
value.attestationObject = credentialBuffer(value.attestationObject) | ||
@@ -351,0 +351,0 @@ return value |
{ | ||
"name": "@1auth/authn-webauthn", | ||
"version": "0.0.0-alpha.38", | ||
"version": "0.0.0-alpha.39", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
10980