You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edward edited this page Jan 14, 2017
·
2 revisions
This appears when using the authenticate middleware used for certain serverside routes (e.g. creating excerpts). The most common cause is a difference in jwtSecret between when a token was originally signed and when it is decoded. In this particular instance, it happened because when a token was signed after login in controllers/auth.js, it was being signed with the wrong secret. This was fixed by changing this line:
var jwtSecret = process.env.JWT_SECRET || 'mysecret';
to this:
var jwtSecret = process.env.JWT_SECRET || config.jwtSecret;