mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Protected against missing member for id token
no-issue If a cookie still exists after a member has been deleted we can have some strange requests, this just ensures that we check for existence.
This commit is contained in:
parent
af25cfb619
commit
a6adfdd92c
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ module.exports = function MembersApi({
|
|||
}
|
||||
async function getMemberIdentityToken(email){
|
||||
const member = await getMemberIdentityData(email);
|
||||
if (!member) {
|
||||
return null;
|
||||
}
|
||||
return encodeIdentityToken({sub: member.email});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue