@1auth/authn-webauthn
Advanced tools
Comparing version 0.0.0-alpha.30 to 0.0.0-alpha.31
@@ -18,2 +18,3 @@ import { encrypt, decrypt } from '@1auth/crypto' | ||
} from '@simplewebauthn/server' | ||
import { isoUint8Array } from '@simplewebauthn/server/helpers' | ||
@@ -37,2 +38,3 @@ const options = { | ||
verify: async (response, authenticator, rest) => { | ||
console.log('verify', authenticator) | ||
try { | ||
@@ -111,2 +113,3 @@ const { verified, authenticationInfo } = | ||
id.push(credential.id) | ||
console.log('authenticateOptions', value) | ||
allowCredentials.push({ | ||
@@ -128,2 +131,3 @@ id: value.credentialID, | ||
const clientOptions = await generateAuthenticationOptions({ | ||
rpID: new URL(options.origin).hostname, | ||
allowCredentials, | ||
@@ -172,2 +176,3 @@ userVerification: 'preferred' | ||
) | ||
console.log('createToken', value) | ||
excludeCredentials.push({ | ||
@@ -209,6 +214,6 @@ id: value.credentialID, | ||
const clientOptions = generateRegistrationOptions({ | ||
const clientOptions = await generateRegistrationOptions({ | ||
rpName: options.name, | ||
rpID: new URL(options.origin).hostname, | ||
userID: sub, | ||
userID: isoUint8Array.fromUTF8String(sub), | ||
userName: username, | ||
@@ -279,3 +284,3 @@ attestationType: 'none', | ||
const jsonEncodeSecret = (value) => { | ||
value.credentialID = credentialNormalize(value.credentialID) | ||
// value.credentialID = credentialNormalize(value.credentialID); | ||
value.credentialPublicKey = credentialNormalize(value.credentialPublicKey) | ||
@@ -290,3 +295,3 @@ value.attestationObject = credentialNormalize(value.attestationObject) | ||
value.credentialID = credentialBuffer(value.credentialID) | ||
// value.credentialID = credentialBuffer(value.credentialID); | ||
value.credentialPublicKey = credentialBuffer(value.credentialPublicKey) | ||
@@ -293,0 +298,0 @@ value.attestationObject = credentialBuffer(value.attestationObject) |
13
index.js
@@ -18,2 +18,3 @@ import { encrypt, decrypt } from '@1auth/crypto' | ||
} from '@simplewebauthn/server' | ||
import { isoUint8Array } from '@simplewebauthn/server/helpers' | ||
@@ -37,2 +38,3 @@ const options = { | ||
verify: async (response, authenticator, rest) => { | ||
console.log('verify', authenticator) | ||
try { | ||
@@ -111,2 +113,3 @@ const { verified, authenticationInfo } = | ||
id.push(credential.id) | ||
console.log('authenticateOptions', value) | ||
allowCredentials.push({ | ||
@@ -128,2 +131,3 @@ id: value.credentialID, | ||
const clientOptions = await generateAuthenticationOptions({ | ||
rpID: new URL(options.origin).hostname, | ||
allowCredentials, | ||
@@ -172,2 +176,3 @@ userVerification: 'preferred' | ||
) | ||
console.log('createToken', value) | ||
excludeCredentials.push({ | ||
@@ -209,6 +214,6 @@ id: value.credentialID, | ||
const clientOptions = generateRegistrationOptions({ | ||
const clientOptions = await generateRegistrationOptions({ | ||
rpName: options.name, | ||
rpID: new URL(options.origin).hostname, | ||
userID: sub, | ||
userID: isoUint8Array.fromUTF8String(sub), | ||
userName: username, | ||
@@ -279,3 +284,3 @@ attestationType: 'none', | ||
const jsonEncodeSecret = (value) => { | ||
value.credentialID = credentialNormalize(value.credentialID) | ||
// value.credentialID = credentialNormalize(value.credentialID); | ||
value.credentialPublicKey = credentialNormalize(value.credentialPublicKey) | ||
@@ -290,3 +295,3 @@ value.attestationObject = credentialNormalize(value.attestationObject) | ||
value.credentialID = credentialBuffer(value.credentialID) | ||
// value.credentialID = credentialBuffer(value.credentialID); | ||
value.credentialPublicKey = credentialBuffer(value.credentialPublicKey) | ||
@@ -293,0 +298,0 @@ value.attestationObject = credentialBuffer(value.attestationObject) |
{ | ||
"name": "@1auth/authn-webauthn", | ||
"version": "0.0.0-alpha.30", | ||
"version": "0.0.0-alpha.31", | ||
"description": "", | ||
@@ -47,6 +47,6 @@ "type": "module", | ||
"homepage": "https://github.com/willfarrell/1auth", | ||
"gitHead": "bba2971096bfd6bcc30e7613fae272896456ecfa", | ||
"gitHead": "246b0b521e6d136d8f37ee7d9781ffc8ccc987bd", | ||
"dependencies": { | ||
"@simplewebauthn/server": "9.0.3" | ||
"@simplewebauthn/server": "10.0.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
19330
570
+ Added@simplewebauthn/server@10.0.0(transitive)
+ Added@simplewebauthn/types@10.0.0(transitive)
- Removed@simplewebauthn/server@9.0.3(transitive)
- Removed@simplewebauthn/types@9.0.1(transitive)