webauthn-p256
Advanced tools
Comparing version 0.0.1-main.20240627T150007 to 0.0.1-main.20240627T151041
@@ -12,3 +12,3 @@ "use strict"; | ||
async function createCredential(parameters) { | ||
const { createFn = window.navigator.credentials.create, ...rest } = parameters; | ||
const { createFn = window.navigator.credentials.create.bind(window.navigator.credentials), ...rest } = parameters; | ||
const options = getCredentialCreationOptions(rest); | ||
@@ -15,0 +15,0 @@ try { |
@@ -6,3 +6,3 @@ "use strict"; | ||
async function sign(parameters) { | ||
const { getFn = window.navigator.credentials.get, ...rest } = parameters; | ||
const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = parameters; | ||
const options = getCredentialSignRequestOptions(rest); | ||
@@ -9,0 +9,0 @@ try { |
@@ -18,3 +18,3 @@ import { keccak_256 } from '@noble/hashes/sha3'; | ||
export async function createCredential(parameters) { | ||
const { createFn = window.navigator.credentials.create, ...rest } = parameters; | ||
const { createFn = window.navigator.credentials.create.bind(window.navigator.credentials), ...rest } = parameters; | ||
const options = getCredentialCreationOptions(rest); | ||
@@ -21,0 +21,0 @@ try { |
@@ -18,3 +18,3 @@ import { base64UrlToBytes, bytesToBase64Url, bytesToHex, hexToBytes, } from './utils.js'; | ||
export async function sign(parameters) { | ||
const { getFn = window.navigator.credentials.get, ...rest } = parameters; | ||
const { getFn = window.navigator.credentials.get.bind(window.navigator.credentials), ...rest } = parameters; | ||
const options = getCredentialSignRequestOptions(rest); | ||
@@ -21,0 +21,0 @@ try { |
@@ -46,3 +46,8 @@ import { keccak_256 } from '@noble/hashes/sha3' | ||
): Promise<CreateCredentialReturnType> { | ||
const { createFn = window.navigator.credentials.create, ...rest } = parameters | ||
const { | ||
createFn = window.navigator.credentials.create.bind( | ||
window.navigator.credentials, | ||
), | ||
...rest | ||
} = parameters | ||
const options = getCredentialCreationOptions(rest) | ||
@@ -49,0 +54,0 @@ try { |
{ | ||
"name": "webauthn-p256", | ||
"description": "P256 signature utilities for WebAuthn", | ||
"version": "0.0.1-main.20240627T150007", | ||
"version": "0.0.1-main.20240627T151041", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./_cjs/index.js", |
@@ -41,3 +41,6 @@ import type { Credential, Hex, WebAuthnSignature } from './types.js' | ||
): Promise<SignReturnType> { | ||
const { getFn = window.navigator.credentials.get, ...rest } = parameters | ||
const { | ||
getFn = window.navigator.credentials.get.bind(window.navigator.credentials), | ||
...rest | ||
} = parameters | ||
const options = getCredentialSignRequestOptions(rest) | ||
@@ -44,0 +47,0 @@ try { |
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
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
144562
1936