Comments (7)
EDIT: removed useless misleading comment
from webauthn.
no ...wait ...there is something more fishy ....your whole crypto modules is not defined ...that strange ...what does it do if you start node in the terminal and you simply enter "crypto" in the prompt? On mine, I get the Crypto object back, what about yours?
from webauthn.
Perhaps it has also something to do with the bundling of your app... crypto
should be a global.
from webauthn.
Thanks for your response. You are right, thats strange. As I read, since node 19 crypto should be globally available.
When I start node and enter crypto
I get Crypto {}
and when I type typeof crypto
I get 'undefined'
.
I got it working by using globalThis.crypto ??= require("node:crypto").webcrypto
as a workaround, maybe this is a problem with tsx which I am using for running in dev environment.
from webauthn.
weird ...but I'm afraid I don't really know what's going on. Thanks for the workaround.
from webauthn.
crypto in node is not available in globals, used the module crypto.
import { webcrypto } from 'crypto';
from webauthn.
@xkid1 I beg to differ: https://nodejs.org/docs/latest-v22.x/api/globals.html#crypto_1
Well, it's weird. Good thing @rkreienbuehl found a workaround.
globalThis.crypto ??= require("node:crypto").webcrypto
from webauthn.
Related Issues (20)
- Using 1Password does not work on demo HOT 1
- Update authenticator names list HOT 1
- Display QR code immediatly HOT 7
- Allow passing `authenticatorSelection.residentKey` option in `client.register` HOT 9
- Import issue in Nestjs HOT 9
- Compatibility with 1Password and Bitwarden HOT 4
- Counters don't work on macbook HOT 5
- Server should not log to console.debug HOT 5
- Issue with ES Modules in firebase functions HOT 4
- ReferenceError: crypto is not defined HOT 1
- verifyAuthentication ERR_OSSL_EVP_DECODE_ERROR HOT 6
- Unexpected RpIdHash HOT 15
- Does it has commonjs version? HOT 3
- Upcoming changes for version "2"? HOT 12
- Error registering key using 1Password HOT 3
- Error: DOMException: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission HOT 2
- Passwordless login with passkeys HOT 4
- Missing crypto import? HOT 3
- Error: ReferenceError: module is not defined in ES module scope in SvelteKit/Vite HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webauthn.