Skip to main content

SmsMfaParameters

@webda/auth


Class: SmsMfaParameters

Defined in: packages/auth/src/mfa/sms.service.ts:8

Parameters for the SMS second factor

Extends​

Constructors​

Constructor​

new SmsMfaParameters(): SmsMfaParameters

Returns​

SmsMfaParameters

Inherited from​

SecondFactorParameters.constructor

Properties​

app?​

optional app?: string

Defined in: packages/auth/src/mfa/sms.service.ts:24

Application name in the message (defaults to the application package name)


digits​

digits: number = 6

Defined in: packages/auth/src/mfa/sms.service.ts:16

Number of digits of a code

Minimum​

4

Maximum​

10


message​

message: string = "{code} is your {app} verification code"

Defined in: packages/auth/src/mfa/sms.service.ts:22

Message template, {code} and {app} are replaced


recoveryCodes​

recoveryCodes: number = 10

Defined in: packages/auth/src/mfa/secondfactor.service.ts:15

Number of recovery codes generated (default 10, 0 disables recovery codes)

Inherited from​

SecondFactorParameters.recoveryCodes


resendDelay​

resendDelay: string | number = "60s"

Defined in: packages/auth/src/mfa/sms.service.ts:20

Minimum delay between two codes sent to the same factor: seconds or a duration string such as "60s"


sender​

sender: string = "SmsSender"

Defined in: packages/auth/src/mfa/sms.service.ts:10

Name of the SmsSender service delivering the codes


throttle​

throttle: ThrottleParameters

Defined in: packages/auth/src/mfa/secondfactor.service.ts:13

Throttle config for failed attempts

Inherited from​

SecondFactorParameters.throttle


ttl​

ttl: string | number = "5m"

Defined in: packages/auth/src/mfa/sms.service.ts:18

Lifetime of a code: seconds or a duration string such as "5m"


type​

type: string

Defined in: packages/core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

SecondFactorParameters.type

Methods​

load()​

load(params?): this

Defined in: packages/core/lib/application/parameters.d.ts:14

Load raw parameters by assigning them onto this instance

Parameters​

params?​

any

the service parameters

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.load


update()​

update(params, delta): this

Defined in: packages/core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.update


with()​

with(callback): this

Defined in: packages/core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

SecondFactorParameters.with