I created a jwt token using create method. I exported the cryptoKey and stored in the session storage.
Whenever deno server gets request it takes the jwt token and decode it for the unique ID of the user presents at JWT body.
With the help of user id, I fetch the cryptoKey in string format convert it to cryptoKey type
Final step is verify method.
Initially it was working. Not sure what happened suddenly. Though passing correct data it is throwing error.
Strange thing here is, I copied the cryptoKey and jwt token in console. And ran the test in separate deno file. When I run it independently it is working.
Is this verify function a pure function? Does this depends on class or require this context ?
It stopped working when moved functions to arrow functions.
I created a jwt token using create method. I exported the cryptoKey and stored in the session storage.
Whenever deno server gets request it takes the jwt token and decode it for the unique ID of the user presents at JWT body.
With the help of user id, I fetch the cryptoKey in string format convert it to cryptoKey type
Final step is verify method.
Initially it was working. Not sure what happened suddenly. Though passing correct data it is throwing error.
Strange thing here is, I copied the cryptoKey and jwt token in console. And ran the test in separate deno file. When I run it independently it is working.
Is this verify function a pure function? Does this depends on class or require this context ?
It stopped working when moved functions to arrow functions.