CenterForDigitalHumanities / TPEN-services

Services required by TPEN interfaces in order to interact with data
1 stars 0 forks source link

auth added token verification and route protection #68

Closed git-voo closed 5 months ago

git-voo commented 6 months ago

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.

git-voo commented 5 months ago
image

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.