Which sectet do I need to verify the jwt in NodeJS?

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?

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!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.