mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Updated to use membersApi iss as expected aud
no-issue This is because we now use specific URLs for audiences claims, e.g. for members running locally the audience would be: - http://localhost:2368/ghost/api/v2/members/
This commit is contained in:
parent
524e32bed5
commit
eaf163cb9c
@ -44,8 +44,6 @@ module.exports = function create(options = EMPTY) {
|
||||
throw new Error('Missing option cookieKeys');
|
||||
}
|
||||
|
||||
const audience = ['members-ssr'];
|
||||
|
||||
const cookieConfig = {
|
||||
keys: [].concat(cookieKeys),
|
||||
secure: cookieSecure
|
||||
@ -56,7 +54,7 @@ module.exports = function create(options = EMPTY) {
|
||||
jwt.verify(token, publicKey, {
|
||||
algorithms: ['RS512'],
|
||||
issuer,
|
||||
audience
|
||||
audience: issuer
|
||||
}, (err, claims) => {
|
||||
if (err) {
|
||||
reject(new UnauthorizedError({err}));
|
||||
|
Loading…
Reference in New Issue
Block a user