7848-recoveryPassword #2858
|
@ -24,6 +24,10 @@ module.exports = Self => {
|
||||||
arg: 'lang',
|
arg: 'lang',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'The user lang'
|
description: 'The user lang'
|
||||||
|
}, {
|
||||||
|
arg: 'twoFactor',
|
||||||
|
type: 'string',
|
||||||
|
description: 'The user twoFactor'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
http: {
|
http: {
|
||||||
|
@ -32,8 +36,8 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.updateUser = async(ctx, id, name, nickname, email, lang) => {
|
Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => {
|
||||||
await Self.userSecurity(ctx, id);
|
await Self.userSecurity(ctx, id);
|
||||||
await Self.upsertWithWhere({id}, {name, nickname, email, lang});
|
await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,9 +101,10 @@ module.exports = function(Self) {
|
||||||
const headers = httpRequest.headers;
|
const headers = httpRequest.headers;
|
||||||
const origin = headers.origin;
|
const origin = headers.origin;
|
||||||
|
|
||||||
const defaultHash = '/reset-password?access_token=$token$';
|
const defaultHash = '!/reset-password?access_token=$token$';
|
||||||
const recoverHashes = {
|
const recoverHashes = {
|
||||||
hedera: 'verificationToken=$token$'
|
hedera: '!verificationToken=$token$',
|
||||||
|
lilium: '/resetPassword?access_token=$token$'
|
||||||
alexm marked this conversation as resolved
|
|||||||
};
|
};
|
||||||
|
|
||||||
const app = info.options?.app;
|
const app = info.options?.app;
|
||||||
|
@ -115,7 +116,7 @@ module.exports = function(Self) {
|
||||||
const params = {
|
const params = {
|
||||||
recipient: info.email,
|
recipient: info.email,
|
||||||
lang: user.lang,
|
lang: user.lang,
|
||||||
url: origin + '/#!' + recoverHash
|
url: origin + '/#' + recoverHash
|
||||||
};
|
};
|
||||||
|
|
||||||
const options = Object.assign({}, info.options);
|
const options = Object.assign({}, info.options);
|
||||||
|
|
Loading…
Reference in New Issue
mejor crear una variable con esto : /reset-password?access_token=$token$ no? y así no escribes 2 veces todo el texto menos ! , añades luego solo el !