Skip to content

@sourceloop/authentication-service / Exports / OtpService

Class: OtpService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new OtpService(otpCacheRepo, userRepository, logger, otpSender)

Parameters

Name Type
otpCacheRepo OtpCacheRepository
userRepository UserRepository
logger ILogger
otpSender OtpFn

Defined in

services/authentication-service/src/services/otp.service.ts:19

Properties

logger

Private Readonly logger: ILogger

Defined in

services/authentication-service/src/services/otp.service.ts:24


otpCacheRepo

Private Readonly otpCacheRepo: OtpCacheRepository

Defined in

services/authentication-service/src/services/otp.service.ts:21


otpSender

Private Readonly otpSender: OtpFn

Defined in

services/authentication-service/src/services/otp.service.ts:26


userRepository

userRepository: UserRepository

Defined in

services/authentication-service/src/services/otp.service.ts:23

Methods

sendOtp

sendOtp(user, client?): Promise<void | OtpResponse>

Parameters

Name Type
user null | User<DataObject<Model>>
client? AuthClient<DataObject<Model>>

Returns

Promise<void | OtpResponse>

Defined in

services/authentication-service/src/services/otp.service.ts:29