Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: crypto is not defined #42

Closed
JuriHaataja opened this issue Mar 24, 2024 · 1 comment
Closed

ReferenceError: crypto is not defined #42

JuriHaataja opened this issue Mar 24, 2024 · 1 comment

Comments

@JuriHaataja
Copy link

I'm running this library with Firebase Functions and for some reason it's unable to use the crypto library that should be built-in in Node v20.

More detailed logs:

ReferenceError: crypto is not defined
at parseCryptoKey (file:https:///workspace/node_modules/@passwordless-id/webauthn/dist/esm/server.js:92:5)
    at verifySignature (file:https:///workspace/node_modules/@passwordless-id/webauthn/dist/esm/server.js:107:27)
    at Module.verifyAuthentication (file:https:///workspace/node_modules/@passwordless-id/webauthn/dist/esm/server.js:31:36)
@JuriHaataja
Copy link
Author

Update:

"engines": {
    "node": "20"
  },

For some reason my node version wasn't synced (it was using v18) with local changes when deployed to cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant