Error: algorithms should be set – JWT Error – How to fix?
To fix the error – Error: algorithms should be set – just add the algorithms to the JWT constructor.
const authenticate = jwt({ secret: secret, algorithms: ['RS256'] //this should be added });