API Reference
Rockets Core API
nestjs-auth-recovery
classes
AuthRecoveryService

Class: AuthRecoveryService

Implements

  • AuthRecoveryServiceInterface

Constructors

new AuthRecoveryService()

new AuthRecoveryService(config, otpService, userLookupService, userMutateService, notificationService, entityManagerProxy): AuthRecoveryService

Parameters

ParameterType
configAuthRecoverySettingsInterface
otpServiceAuthRecoveryOtpServiceInterface
userLookupServiceAuthRecoveryUserLookupServiceInterface
userMutateServiceAuthRecoveryUserMutateServiceInterface
notificationServiceAuthRecoveryNotificationService
entityManagerProxyEntityManagerProxy

Returns

AuthRecoveryService

Defined in

packages/nestjs-auth-recovery/src/services/auth-recovery.service.ts:27 (opens in a new tab)

Methods

recoverLogin()

recoverLogin(email, queryOptions?): Promise<void>

Recover lost username providing an email and send the username by email.

Parameters

ParameterTypeDescription
emailstringuser 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(email, queryOptions?): Promise<void>

Recover lost password providing an email and send the passcode token by email.

Parameters

ParameterTypeDescription
emailstringuser 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(email, queryOptions?): Promise<void>

Recover lost password providing an email and send the passcode token by email.

Parameters

ParameterTypeDescription
emailstringuser 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

ParameterTypeDescription
passcodestringOTP user's passcode
newPasswordstringnew 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

ParameterTypeDefault valueDescription
passcodestringundefineduser's passcode
deleteIfValidbooleanfalseflag to delete if valid or not
queryOptions?QueryOptionsInterfaceundefined-

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)