mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
remove overwritting env var witohut passing by the config
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
1cb92daa77
commit
d7327d4395
@ -44,9 +44,7 @@ module.exports = {
|
||||
_.defaults(jwtOptions, defaultJwtOptions);
|
||||
return jwt.sign(
|
||||
_.clone(payload.toJSON ? payload.toJSON() : payload),
|
||||
process.env.JWT_SECRET ||
|
||||
_.get(strapi.plugins['users-permissions'], 'config.jwtSecret') ||
|
||||
'oursecret',
|
||||
_.get(strapi.plugins, ['users-permissions', 'config', 'jwtSecret']),
|
||||
jwtOptions
|
||||
);
|
||||
},
|
||||
@ -55,9 +53,7 @@ module.exports = {
|
||||
return new Promise(function(resolve, reject) {
|
||||
jwt.verify(
|
||||
token,
|
||||
process.env.JWT_SECRET ||
|
||||
_.get(strapi.plugins['users-permissions'], 'config.jwtSecret') ||
|
||||
'oursecret',
|
||||
_.get(strapi.plugins, ['users-permissions', 'config', 'jwtSecret']),
|
||||
{},
|
||||
function(err, tokenPayload = {}) {
|
||||
if (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user