@1auth/authn-webauthn
Advanced tools
Comparing version
17
index.js
@@ -5,2 +5,3 @@ import { | ||
count as authnCount, | ||
select as authnSelect, | ||
list as authnList, | ||
@@ -196,3 +197,3 @@ create as authnCreate, | ||
const excludeCredentials = [] | ||
for (let i = credentials.length; i--;) { | ||
for (let i = credentials.length; i--; ) { | ||
const credential = credentials[i] | ||
@@ -258,7 +259,3 @@ const value = options.secret.decode(credential.value) | ||
} | ||
const { registrationInfo } = await authnVerify( | ||
options.token, | ||
sub, | ||
credential | ||
) | ||
const { registrationInfo } = await authnVerify(options.token, sub, credential) | ||
return registrationInfo | ||
@@ -280,3 +277,3 @@ } | ||
const allowCredentials = [] | ||
for (let i = credentials.length; i--;) { | ||
for (let i = credentials.length; i--; ) { | ||
const credential = credentials[i] | ||
@@ -298,3 +295,3 @@ const authenticator = options.secret.decode(credential.value) | ||
const challenges = [] | ||
for (let i = credentials.length; i--;) { | ||
for (let i = credentials.length; i--; ) { | ||
const credential = credentials[i] | ||
@@ -341,2 +338,6 @@ const authenticator = options.secret.decode(credential.value) | ||
export const select = async (sub, id) => { | ||
return await authnSelect(options.secret, sub, id) | ||
} | ||
const jsonEncodeSecret = (value) => { | ||
@@ -343,0 +344,0 @@ // value.credential.id = credentialNormalize(value.credential.id); |
{ | ||
"name": "@1auth/authn-webauthn", | ||
"version": "0.0.0-alpha.47", | ||
"version": "0.0.0-alpha.48", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "type": "module", |
11159
1%