Skip to content

Commit

Permalink
Disable console warning for native crypto modules (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarne committed Sep 9, 2022
1 parent d8d9c0c commit adaab4d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/toolbox.js
Expand Up @@ -24,13 +24,11 @@ import * as peculiarCrypto from "@peculiar/webcrypto";
let webcrypto;
if ((typeof self !== "undefined") && "crypto" in self) {
// Always use crypto if available natively (browser / Deno)
console.warn("[FIDO2-LIB] Native crypto is enabled");
webcrypto = self.crypto;

} else {
// Always use node webcrypto if available ( >= 16.0 )
if(platformCrypto && platformCrypto.webcrypto) {
console.warn("[FIDO2-LIB] Native crypto is enabled");
webcrypto = platformCrypto.webcrypto;

} else {
Expand Down

0 comments on commit adaab4d

Please sign in to comment.