diff options
Diffstat (limited to 'packages/server/src/attestation/generateAttestationOptions.ts')
-rw-r--r-- | packages/server/src/attestation/generateAttestationOptions.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/server/src/attestation/generateAttestationOptions.ts b/packages/server/src/attestation/generateAttestationOptions.ts index 89ac86a..d142740 100644 --- a/packages/server/src/attestation/generateAttestationOptions.ts +++ b/packages/server/src/attestation/generateAttestationOptions.ts @@ -1,5 +1,6 @@ -import { +import type { PublicKeyCredentialCreationOptionsJSON, + Base64URLString, } from '@simplewebauthn/typescript-types'; type Options = { @@ -11,7 +12,7 @@ type Options = { userDisplayName?: string, timeout?: number, attestationType?: AttestationConveyancePreference, - excludedBase64CredentialIDs?: string[], + excludedCredentialIDs?: Base64URLString[], suggestedTransports?: AuthenticatorTransport[], authenticatorSelection?: AuthenticatorSelectionCriteria, extensions?: AuthenticationExtensionsClientInputs, @@ -30,7 +31,7 @@ type Options = { * @param userDisplayName User's actual name * @param timeout How long (in ms) the user can take to complete attestation * @param attestationType Specific attestation statement - * @param excludedBase64CredentialIDs Array of base64-encoded authenticator IDs registered by the + * @param excludedCredentialIDs Array of base64url-encoded authenticator IDs registered by the * user so the user can't register the same credential multiple times * @param suggestedTransports Suggested types of authenticators for attestation * @param authenticatorSelection Advanced criteria for restricting the types of authenticators that @@ -49,7 +50,7 @@ export default function generateAttestationOptions( userDisplayName = userName, timeout = 60000, attestationType = 'none', - excludedBase64CredentialIDs = [], + excludedCredentialIDs = [], suggestedTransports = ['usb', 'ble', 'nfc', 'internal'], authenticatorSelection, extensions, @@ -74,7 +75,7 @@ export default function generateAttestationOptions( ], timeout, attestation: attestationType, - excludeCredentials: excludedBase64CredentialIDs.map((id) => ({ + excludeCredentials: excludedCredentialIDs.map((id) => ({ id, type: 'public-key', transports: suggestedTransports, |