|
|
@@ -211,7 +211,7 @@ module.exports = class UserService extends Schmervice.Service {
|
|
211
|
211
|
* @returns {Token}
|
|
212
|
212
|
*/
|
|
213
|
213
|
createToken(data, expiration = 600) {
|
|
214
|
|
- const key = this.server.registrations['main-app-plugin'].options.jwtKey
|
|
|
214
|
+ const key = process.env.APP_SECRET
|
|
215
|
215
|
const obj = {}
|
|
216
|
216
|
Object.assign(obj, { ...data })
|
|
217
|
217
|
return JWT.sign(obj, key, { expiresIn: expiration })
|