Socket
Socket
Sign inDemoInstall

webauthn-p256

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webauthn-p256 - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9-main.20240805T213617

4

_cjs/sign.js

@@ -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": []
}
}

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc