I want to use a middleware like that:
const verifyToken = (req, res, next) => { const token = req.headers.authorization.split(" ")[1]; const verifiedToken = jwt.verify( token, "which secret to use here?" ); next(); };
I tried every Client Secret I could find in my Auth0 account, but none worked.
Can you tell me which secret to use here?
tyf
February 4, 2023, 12:30am
3
Hi there @mikamanelka welcome to the community!
Auth0 exposes a JWKS endpoint for each tenant, which is found at https://YOUR_DOMAIN/.well-known/jwks.json
. This endpoint will contain the JWK used to verify all Auth0-issued JWTs for this tenant.
See secretOrPublicKey
here:
Hope this helps!
system
Closed
February 18, 2023, 12:30am
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.