Class: AuthRecoveryService
Implements
AuthRecoveryServiceInterface
Constructors
new AuthRecoveryService()
new AuthRecoveryService(
config,otpService,userLookupService,userMutateService,notificationService,entityManagerProxy):AuthRecoveryService
Parameters
| Parameter | Type |
|---|---|
config | AuthRecoverySettingsInterface |
otpService | AuthRecoveryOtpServiceInterface |
userLookupService | AuthRecoveryUserLookupServiceInterface |
userMutateService | AuthRecoveryUserMutateServiceInterface |
notificationService | AuthRecoveryNotificationService |
entityManagerProxy | EntityManagerProxy |
Returns
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:27 (opens in a new tab)
Methods
recoverLogin()
recoverLogin(
queryOptions?):Promise<void>
Recover lost username providing an email and send the username by email.
Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | user email |
queryOptions? | QueryOptionsInterface | - |
Returns
Promise<void>
Implementation of
AuthRecoveryServiceInterface.recoverLogin
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:46 (opens in a new tab)
recoverPassword()
recoverPassword(
queryOptions?):Promise<void>
Recover lost password providing an email and send the passcode token by email.
Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | user email |
queryOptions? | QueryOptionsInterface | - |
Returns
Promise<void>
Implementation of
AuthRecoveryServiceInterface.recoverPassword
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:71 (opens in a new tab)
revokeAllUserPasswordRecoveries()
revokeAllUserPasswordRecoveries(
queryOptions?):Promise<void>
Recover lost password providing an email and send the passcode token by email.
Parameters
| Parameter | Type | Description |
|---|---|---|
email | string | user email |
queryOptions? | QueryOptionsInterface | - |
Returns
Promise<void>
Implementation of
AuthRecoveryServiceInterface.revokeAllUserPasswordRecoveries
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:190 (opens in a new tab)
updatePassword()
updatePassword(
passcode,newPassword,queryOptions?):Promise<null|ReferenceIdInterface<string>>
Change user's password by providing it's OTP passcode and the new password.
Parameters
| Parameter | Type | Description |
|---|---|---|
passcode | string | OTP user's passcode |
newPassword | string | new user password |
queryOptions? | QueryOptionsInterface | - |
Returns
Promise<null | ReferenceIdInterface<string>>
Implementation of
AuthRecoveryServiceInterface.updatePassword
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:137 (opens in a new tab)
validatePasscode()
validatePasscode(
passcode,deleteIfValid,queryOptions?):Promise<null|ReferenceAssigneeInterface<ReferenceIdInterface<string>>>
Validate passcode and return it's user.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
passcode | string | undefined | user's passcode |
deleteIfValid | boolean | false | flag to delete if valid or not |
queryOptions? | QueryOptionsInterface | undefined | - |
Returns
Promise<null | ReferenceAssigneeInterface<ReferenceIdInterface<string>>>
Implementation of
AuthRecoveryServiceInterface.validatePasscode
Defined in
packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:114 (opens in a new tab)