supertokens-node
Preparing search index...
recipe/totp
APIInterface
Type Alias APIInterface
type
APIInterface
=
{
createDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
?:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
deviceName
:
string
;
qrCodeString
:
string
;
secret
:
string
;
status
:
"OK"
;
}
|
{
status
:
"DEVICE_ALREADY_EXISTS_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
listDevicesGET
:
|
undefined
|
(
(
input
:
{
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
devices
:
{
name
:
string
;
period
:
number
;
skew
:
number
;
verified
:
boolean
;
}
[]
;
status
:
"OK"
;
}
|
GeneralErrorResponse
,
>
)
;
removeDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
didDeviceExist
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
,
>
)
;
verifyDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
totp
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
;
wasAlreadyVerified
:
boolean
}
|
{
status
:
"UNKNOWN_DEVICE_ERROR"
}
|
{
currentNumberOfFailedAttempts
:
number
;
maxNumberOfFailedAttempts
:
number
;
status
:
"INVALID_TOTP_ERROR"
;
}
|
{
retryAfterMs
:
number
;
status
:
"LIMIT_REACHED_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
verifyTOTPPOST
:
|
undefined
|
(
(
input
:
{
options
:
APIOptions
;
session
:
SessionContainer
;
totp
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
}
|
{
currentNumberOfFailedAttempts
:
number
;
maxNumberOfFailedAttempts
:
number
;
status
:
"INVALID_TOTP_ERROR"
;
}
|
{
retryAfterMs
:
number
;
status
:
"LIMIT_REACHED_ERROR"
}
|
GeneralErrorResponse
,
>
)
;
}
Index
Properties
create
DevicePOST
list
DevicesGET
remove
DevicePOST
verify
DevicePOST
verifyTOTPPOST
Properties
create
DevicePOST
createDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
?:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
deviceName
:
string
;
qrCodeString
:
string
;
secret
:
string
;
status
:
"OK"
;
}
|
{
status
:
"DEVICE_ALREADY_EXISTS_ERROR"
}
|
GeneralErrorResponse
,
>
)
list
DevicesGET
listDevicesGET
:
|
undefined
|
(
(
input
:
{
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
devices
:
{
name
:
string
;
period
:
number
;
skew
:
number
;
verified
:
boolean
;
}
[]
;
status
:
"OK"
;
}
|
GeneralErrorResponse
,
>
)
remove
DevicePOST
removeDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
{
didDeviceExist
:
boolean
;
status
:
"OK"
}
|
GeneralErrorResponse
,
>
)
verify
DevicePOST
verifyDevicePOST
:
|
undefined
|
(
(
input
:
{
deviceName
:
string
;
options
:
APIOptions
;
session
:
SessionContainer
;
totp
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
;
wasAlreadyVerified
:
boolean
}
|
{
status
:
"UNKNOWN_DEVICE_ERROR"
}
|
{
currentNumberOfFailedAttempts
:
number
;
maxNumberOfFailedAttempts
:
number
;
status
:
"INVALID_TOTP_ERROR"
;
}
|
{
retryAfterMs
:
number
;
status
:
"LIMIT_REACHED_ERROR"
}
|
GeneralErrorResponse
,
>
)
verifyTOTPPOST
verifyTOTPPOST
:
|
undefined
|
(
(
input
:
{
options
:
APIOptions
;
session
:
SessionContainer
;
totp
:
string
;
userContext
:
UserContext
;
}
,
)
=>
Promise
<
|
{
status
:
"OK"
|
"UNKNOWN_USER_ID_ERROR"
}
|
{
currentNumberOfFailedAttempts
:
number
;
maxNumberOfFailedAttempts
:
number
;
status
:
"INVALID_TOTP_ERROR"
;
}
|
{
retryAfterMs
:
number
;
status
:
"LIMIT_REACHED_ERROR"
}
|
GeneralErrorResponse
,
>
)
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
create
DevicePOST
list
DevicesGET
remove
DevicePOST
verify
DevicePOST
verifyTOTPPOST
supertokens-node
Loading...