Closed git-voo closed 5 months ago
Note: before testing, redefine the process.env.AUDIENCE and pass value or manually add audience in the function as this test has a had time reading from env directly. I reset the audience to read env after testing.
I created two functions in the verifyToken middleware(directory). the first is a custom JWT decoder while the other leverages Auth0 for toekn verification or decoding. Both functions are called in the app.mjs to test how they interract with routes. In the end, Only one of these functions would be kept.