mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Copying reset password changes (#12108)
This commit is contained in:
parent
c5a06423ef
commit
3828c93e23
2 changed files with 6 additions and 0 deletions
|
|
@ -320,6 +320,11 @@ export class OauthService implements IOAuthService {
|
|||
organizationDetails = await this.organizationRepository.fetchOrganization(userDetails.defaultOrganizationId);
|
||||
}
|
||||
|
||||
// Clear forgot password token
|
||||
if (userDetails.forgotPasswordToken) {
|
||||
await this.userRepository.updateOne(userDetails.id, { forgotPasswordToken: null }, manager);
|
||||
}
|
||||
|
||||
return await this.sessionUtilService.generateLoginResultPayload(
|
||||
response,
|
||||
userDetails,
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ export class AuthService implements IAuthService {
|
|||
const updateData = {
|
||||
...(shouldUpdateDefaultOrgId && { defaultOrganizationId: organization?.id }),
|
||||
passwordRetryCount: 0,
|
||||
forgotPasswordToken: null,
|
||||
};
|
||||
|
||||
await this.userRepository.updateOne(user.id, updateData, manager);
|
||||
|
|
|
|||
Loading…
Reference in a new issue