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  Array.find Method in JavaScript

Leave a Reply

Your email address will not be published.

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