mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
Removed the need for audience and issuer claim
no-issue This is unecessary as this is a closes system, the tokens are issued and intended for the same service, using the same secret
This commit is contained in:
parent
483654a4b6
commit
4c4d5aab91
@ -89,8 +89,6 @@ function MagicLink(options) {
|
||||
*/
|
||||
MagicLink.prototype.sendMagicLink = async function sendMagicLink(options) {
|
||||
const token = jwt.sign({}, this.secret, {
|
||||
audience: '@tryghost/magic-link',
|
||||
issuer: '@tryghost/magic-link',
|
||||
algorithm: 'HS256',
|
||||
subject: options.subject,
|
||||
expiresIn: '10m'
|
||||
@ -119,8 +117,6 @@ MagicLink.prototype.sendMagicLink = async function sendMagicLink(options) {
|
||||
MagicLink.prototype.getUserFromToken = function getUserFromToken(token) {
|
||||
/** @type {object} */
|
||||
const claims = jwt.verify(token, this.secret, {
|
||||
audience: '@tryghost/magic-link',
|
||||
issuer: '@tryghost/magic-link',
|
||||
algorithms: ['HS256'],
|
||||
maxAge: '10m'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user