webauthn-p256
Advanced tools
Comparing version 0.0.8 to 0.0.9-main.20240805T213617
@@ -36,3 +36,3 @@ "use strict"; | ||
function getCredentialSignRequestOptions(parameters) { | ||
const { credentialId, hash, rpId = window.location.hostname } = parameters; | ||
const { credentialId, hash, rpId = window.location.hostname, userVerification = 'required', } = parameters; | ||
const challenge = (0, utils_js_1.base64UrlToBytes)((0, utils_js_1.bytesToBase64Url)((0, utils_js_1.hexToBytes)(hash))); | ||
@@ -53,3 +53,3 @@ return { | ||
rpId, | ||
userVerification: 'required', | ||
userVerification, | ||
}, | ||
@@ -56,0 +56,0 @@ }; |
@@ -57,3 +57,3 @@ import { numberToBytesBE } from '@noble/curves/abstract/utils'; | ||
export function getCredentialSignRequestOptions(parameters) { | ||
const { credentialId, hash, rpId = window.location.hostname } = parameters; | ||
const { credentialId, hash, rpId = window.location.hostname, userVerification = 'required', } = parameters; | ||
const challenge = base64UrlToBytes(bytesToBase64Url(hexToBytes(hash))); | ||
@@ -74,3 +74,3 @@ return { | ||
rpId, | ||
userVerification: 'required', | ||
userVerification, | ||
}, | ||
@@ -77,0 +77,0 @@ }; |
@@ -38,2 +38,3 @@ import type { Credential, Hex, Signature, WebAuthnData } from './types.js'; | ||
rpId?: PublicKeyCredentialRequestOptions['rpId'] | undefined; | ||
userVerification?: PublicKeyCredentialRequestOptions['userVerification'] | undefined; | ||
}; | ||
@@ -40,0 +41,0 @@ export type GetCredentialSignRequestOptionsReturnType = CredentialRequestOptions; |
# webauthn-p256 | ||
## 0.0.9 | ||
### Patch Changes | ||
- [`11ee43e`](https://github.com/wevm/webauthn-p256/commit/11ee43e1cd7b358d47b59dae0c4ddd29941d1c23) Thanks [@jxom](https://github.com/jxom)! - Added `userVerification` as a parameter to `sign`. | ||
## 0.0.8 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "webauthn-p256", | ||
"description": "P256 signature utilities for WebAuthn", | ||
"version": "0.0.8", | ||
"version": "0.0.9-main.20240805T213617", | ||
"type": "module", | ||
@@ -36,2 +36,2 @@ "main": "./_cjs/index.js", | ||
"keywords": [] | ||
} | ||
} |
12
sign.ts
@@ -93,2 +93,5 @@ import { numberToBytesBE } from '@noble/curves/abstract/utils' | ||
rpId?: PublicKeyCredentialRequestOptions['rpId'] | undefined | ||
userVerification?: | ||
| PublicKeyCredentialRequestOptions['userVerification'] | ||
| undefined | ||
} | ||
@@ -110,3 +113,8 @@ export type GetCredentialSignRequestOptionsReturnType = CredentialRequestOptions | ||
): GetCredentialSignRequestOptionsReturnType { | ||
const { credentialId, hash, rpId = window.location.hostname } = parameters | ||
const { | ||
credentialId, | ||
hash, | ||
rpId = window.location.hostname, | ||
userVerification = 'required', | ||
} = parameters | ||
const challenge = base64UrlToBytes(bytesToBase64Url(hexToBytes(hash))) | ||
@@ -127,3 +135,3 @@ return { | ||
rpId, | ||
userVerification: 'required', | ||
userVerification, | ||
}, | ||
@@ -130,0 +138,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
189919
3115