@morojs/moro / twoFactor
Function: twoFactor()
twoFactor(
options):object
Defined in: src/core/middleware/built-in/auth/core.ts:214
Helper to create 2FA configuration Usage in auth config:
auth({ plugins: [twoFactor({ issuer: 'MyApp' })], ... })
Parameters
options
TwoFactorAuthOptions = {}
Returns
object
backupCodes
backupCodes:
boolean
backupCodesCount
backupCodesCount:
number
issuer
issuer:
string
totp
totp:
boolean
trustDevice
trustDevice:
boolean
trustDeviceDuration
trustDeviceDuration:
number
type
type:
"2fa"