0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Updated members-api to work with new magic-link class

no-issue

The MagicLink class now accepts a TokenProvider rather than a secret
This commit is contained in:
Fabien O'Carroll 2020-09-17 16:02:30 +01:00 committed by Fabien 'egg' O'Carroll
parent de7f5c1383
commit 0723a1f9ed

View file

@ -1,6 +1,7 @@
const _ = require('lodash');
const {Router} = require('express');
const body = require('body-parser');
const JWTTokenProvider = require('@tryghost/magic-link/JWTTokenProvider');
const MagicLink = require('@tryghost/magic-link');
const StripePaymentProcessor = require('./lib/stripe');
const Tokens = require('./lib/tokens');
@ -93,7 +94,7 @@ module.exports = function MembersApi({
const magicLinkService = new MagicLink({
transporter,
secret,
tokenProvider: new JWTTokenProvider(secret),
getSigninURL,
getText,
getHTML,