Skip to content

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
See also  Substring vs Substr in JavaScript

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.