|
@@ -17,7 +17,7 @@ passport.use(
|
|
|
try {
|
|
try {
|
|
|
// 'sub' used to be the email address
|
|
// 'sub' used to be the email address
|
|
|
// this check makes sure to invalidate old JWTs where the sub is still the email address
|
|
// this check makes sure to invalidate old JWTs where the sub is still the email address
|
|
|
- if (typeof payload.sub === "string") {
|
|
|
|
|
|
|
+ if (typeof payload.sub === "string" || !payload.sub) {
|
|
|
return done(null, false);
|
|
return done(null, false);
|
|
|
}
|
|
}
|
|
|
const user = await query.user.find({ id: payload.sub });
|
|
const user = await query.user.find({ id: payload.sub });
|