paragonie / paseto

Platform-Agnostic Security Tokens
https://paseto.io
Other
3.23k stars 108 forks source link

ReferenceError: cb is not defined #97

Closed joseramongravity closed 5 years ago

joseramongravity commented 5 years ago

Error happens on macOs when trying to generate the token

ReferenceError: cb is not defined
    at encoder.encrypt (/Users/.../server/src/utils.js:556:16)
    at /Users/.../server/node_modules/paseto.js/lib/utils.js:239:39
    at sodium.ready.then (/Users/.../server/node_modules/paseto.js/lib/protocol/V2.js:146:14)

Edit: This happens when i try to use something that is not the callback function Error: Failed to construct 'TextDecoder': the 'fatal' option is unsupported.

I will move this to the Paseto.js

Mythra commented 5 years ago

This looks to be a problem with the javascript version of Paseto, which is located: HERE not the PHP version (at least according to the stack trace), do you also run into problems with the PHP Version?

joseramongravity commented 5 years ago

Havent tested the PHP Version, im working with Express, Node so i didnt test the PHP Version