Hello, I tried using this library to generate some PASETO tokens but ran into an issue where it would give the following error:
TypeError [ERR_INVALID_THIS]: Value of "this" must be of type Crypto
By passing the actual function from the crypto module solved my problem like so const token = await encrypt(encryptKey, {'hello' : 'world'},{getRandomValues : crypto.getRandomValues});.
Hello, I tried using this library to generate some PASETO tokens but ran into an issue where it would give the following error:
By passing the actual function from the
crypto
module solved my problem like soconst token = await encrypt(encryptKey, {'hello' : 'world'},{getRandomValues : crypto.getRandomValues});
.