mirror of
https://github.com/directus/directus.git
synced 2026-02-10 20:35:04 -05:00
@@ -324,7 +324,9 @@ export class UsersService extends ItemsService {
|
||||
|
||||
const payload = { email, scope: 'password-reset', hash: getSimpleHash('' + user.password) };
|
||||
const token = jwt.sign(payload, env.SECRET as string, { expiresIn: '1d', issuer: 'directus' });
|
||||
const acceptURL = url ? `${url}?token=${token}` : `${env.PUBLIC_URL}/admin/reset-password?token=${token}`;
|
||||
const acceptURL = url
|
||||
? new Url(url).setQuery('token', token).toString()
|
||||
: new Url(env.PUBLIC_URL).addPath('admin', 'reset-password').setQuery('token', token);
|
||||
const subjectLine = subject ? subject : 'Password Reset Request';
|
||||
|
||||
await mailService.send({
|
||||
|
||||
Reference in New Issue
Block a user