Search
Preparing search index...
The search index is not available
supertokens-auth-react
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-auth-react
recipe/webauthn
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Components
Override
Provider
Methods
authenticate
Credential
authenticate
Credential
With
Sign
In
create
And
Register
Credential
For
Session
User
create
Credential
does
Browser
Support
Web
Authn
generate
Recover
Account
Token
get
Email
Exists
get
Register
Options
get
Sign
In
Options
init
list
Credentials
recover
Account
register
Credential
register
Credential
With
Recover
Account
register
Credential
With
Sign
Up
remove
Credential
sign
In
sign
Up
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
Components
Override
Provider
Components
Override
Provider
:
FC
<
PropsWithChildren
<
{
components
:
ComponentOverrideMap
}
>
>
= RecipeComponentsOverrideContextProvider
Methods
Static
authenticate
Credential
authenticate
Credential
(
input
:
{
authenticationOptions
:
Omit
<
AuthenticationOptions
,
"status"
|
"fetchResponse"
>
;
userContext
:
any
}
)
:
Promise
<
{
authenticationResponse
:
AuthenticationResponseJSON
;
status
:
"OK"
}
|
{
error
:
any
;
status
:
"FAILED_TO_AUTHENTICATE_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
authenticationOptions
:
Omit
<
AuthenticationOptions
,
"status"
|
"fetchResponse"
>
;
userContext
:
any
}
authentication
Options
:
Omit
<
AuthenticationOptions
,
"status"
|
"fetchResponse"
>
user
Context
:
any
Returns
Promise
<
{
authenticationResponse
:
AuthenticationResponseJSON
;
status
:
"OK"
}
|
{
error
:
any
;
status
:
"FAILED_TO_AUTHENTICATE_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
authenticate
Credential
With
Sign
In
authenticate
Credential
With
Sign
In
(
input
:
{
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_AUTHENTICATE_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
}
Optional
options
?:
RecipeFunctionOptions
Optional
should
Try
Linking
With
Session
User
?:
boolean
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_AUTHENTICATE_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
create
And
Register
Credential
For
Session
User
create
And
Register
Credential
For
Session
User
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
recipeUserId
:
string
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
reason
?:
string
;
status
:
"REGISTER_CREDENTIAL_NOT_ALLOWED"
}
|
{
err
:
string
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
reason
?:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
recipeUserId
:
string
;
userContext
:
any
}
email
:
string
Optional
options
?:
RecipeFunctionOptions
recipe
User
Id
:
string
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
reason
?:
string
;
status
:
"REGISTER_CREDENTIAL_NOT_ALLOWED"
}
|
{
err
:
string
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
reason
?:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
create
Credential
create
Credential
(
input
:
{
registrationOptions
:
Omit
<
RegistrationOptions
,
"status"
|
"fetchResponse"
>
;
userContext
:
any
}
)
:
Promise
<
{
registrationResponse
:
RegistrationResponseJSON
;
status
:
"OK"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
registrationOptions
:
Omit
<
RegistrationOptions
,
"status"
|
"fetchResponse"
>
;
userContext
:
any
}
registration
Options
:
Omit
<
RegistrationOptions
,
"status"
|
"fetchResponse"
>
user
Context
:
any
Returns
Promise
<
{
registrationResponse
:
RegistrationResponseJSON
;
status
:
"OK"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
does
Browser
Support
Web
Authn
does
Browser
Support
Web
Authn
(
input
:
{
userContext
:
any
}
)
:
Promise
<
{
browserSupportsWebauthn
:
boolean
;
platformAuthenticatorIsAvailable
:
boolean
;
status
:
"OK"
}
|
{
error
:
any
;
status
:
"ERROR"
}
>
Parameters
input:
{
userContext
:
any
}
user
Context
:
any
Returns
Promise
<
{
browserSupportsWebauthn
:
boolean
;
platformAuthenticatorIsAvailable
:
boolean
;
status
:
"OK"
}
|
{
error
:
any
;
status
:
"ERROR"
}
>
Static
generate
Recover
Account
Token
generate
Recover
Account
Token
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"RECOVER_ACCOUNT_NOT_ALLOWED"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
email
:
string
Optional
options
?:
RecipeFunctionOptions
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"RECOVER_ACCOUNT_NOT_ALLOWED"
}
>
Static
get
Email
Exists
get
Email
Exists
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
exists
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
email
:
string
Optional
options
?:
RecipeFunctionOptions
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
exists
:
boolean
;
fetchResponse
:
Response
;
status
:
"OK"
}
>
Static
get
Register
Options
get
Register
Options
(
input
:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
&
{
email
:
string
}
&
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
&
{
recoverAccountToken
:
string
}
)
:
Promise
<
{
attestation
:
"none"
|
"indirect"
|
"direct"
|
"enterprise"
;
authenticatorSelection
:
{
requireResidentKey
:
boolean
;
residentKey
:
ResidentKey
;
userVerification
:
UserVerification
}
;
challenge
:
string
;
createdAt
:
string
;
excludeCredentials
:
{
id
:
string
;
transports
:
(
"ble"
|
"hybrid"
|
"internal"
|
"nfc"
|
"usb"
)
[]
;
type
:
"public-key"
}
[]
;
expiresAt
:
string
;
fetchResponse
:
Response
;
pubKeyCredParams
:
{
alg
:
number
;
type
:
"public-key"
}
[]
;
rp
:
{
id
:
string
;
name
:
string
}
;
status
:
"OK"
;
timeout
:
number
;
user
:
{
displayName
:
string
;
id
:
string
;
name
:
string
}
;
webauthnGeneratedOptionsId
:
string
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
err
:
string
;
fetchResponse
:
Response
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
&
{
email
:
string
}
&
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
&
{
recoverAccountToken
:
string
}
Returns
Promise
<
{
attestation
:
"none"
|
"indirect"
|
"direct"
|
"enterprise"
;
authenticatorSelection
:
{
requireResidentKey
:
boolean
;
residentKey
:
ResidentKey
;
userVerification
:
UserVerification
}
;
challenge
:
string
;
createdAt
:
string
;
excludeCredentials
:
{
id
:
string
;
transports
:
(
"ble"
|
"hybrid"
|
"internal"
|
"nfc"
|
"usb"
)
[]
;
type
:
"public-key"
}
[]
;
expiresAt
:
string
;
fetchResponse
:
Response
;
pubKeyCredParams
:
{
alg
:
number
;
type
:
"public-key"
}
[]
;
rp
:
{
id
:
string
;
name
:
string
}
;
status
:
"OK"
;
timeout
:
number
;
user
:
{
displayName
:
string
;
id
:
string
;
name
:
string
}
;
webauthnGeneratedOptionsId
:
string
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
err
:
string
;
fetchResponse
:
Response
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
>
Static
get
Sign
In
Options
get
Sign
In
Options
(
input
:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
challenge
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
timeout
:
number
;
userVerification
:
UserVerification
;
webauthnGeneratedOptionsId
:
string
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
Optional
options
?:
RecipeFunctionOptions
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
challenge
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
timeout
:
number
;
userVerification
:
UserVerification
;
webauthnGeneratedOptionsId
:
string
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
>
Static
init
init
(
config
?:
UserInput
)
:
RecipeInitResult
<
GetRedirectionURLContext
,
PreAndPostAPIHookAction
,
OnHandleEventContext
,
NormalisedConfig
>
Parameters
Optional
config:
UserInput
Returns
RecipeInitResult
<
GetRedirectionURLContext
,
PreAndPostAPIHookAction
,
OnHandleEventContext
,
NormalisedConfig
>
Static
list
Credentials
list
Credentials
(
input
:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
credentials
:
{
createdAt
:
number
;
recipeUserId
:
string
;
relyingPartyId
:
string
;
webauthnCredentialId
:
string
}
[]
;
status
:
"OK"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
userContext
:
any
}
Optional
options
?:
RecipeFunctionOptions
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
credentials
:
{
createdAt
:
number
;
recipeUserId
:
string
;
relyingPartyId
:
string
;
webauthnCredentialId
:
string
}
[]
;
status
:
"OK"
}
>
Static
recover
Account
recover
Account
(
input
:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
token
:
string
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
)
:
Promise
<
GeneralErrorResponse
|
{
email
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
>
Parameters
input:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
token
:
string
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
credential
:
RegistrationResponseJSON
Optional
options
?:
RecipeFunctionOptions
token
:
string
user
Context
:
any
webauthn
Generated
Options
Id
:
string
Returns
Promise
<
GeneralErrorResponse
|
{
email
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
>
Static
register
Credential
register
Credential
(
input
:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
recipeUserId
:
string
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
)
:
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
reason
?:
string
;
status
:
"REGISTER_CREDENTIAL_NOT_ALLOWED"
}
|
{
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
reason
?:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
>
Parameters
input:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
recipeUserId
:
string
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
credential
:
RegistrationResponseJSON
Optional
options
?:
RecipeFunctionOptions
recipe
User
Id
:
string
user
Context
:
any
webauthn
Generated
Options
Id
:
string
Returns
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
reason
?:
string
;
status
:
"REGISTER_CREDENTIAL_NOT_ALLOWED"
}
|
{
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
reason
?:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
>
Static
register
Credential
With
Recover
Account
register
Credential
With
Recover
Account
(
input
:
{
options
?:
RecipeFunctionOptions
;
recoverAccountToken
:
string
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
email
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_GENERATED_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
options
?:
RecipeFunctionOptions
;
recoverAccountToken
:
string
;
userContext
:
any
}
Optional
options
?:
RecipeFunctionOptions
recover
Account
Token
:
string
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
email
:
string
;
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_GENERATED_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
register
Credential
With
Sign
Up
register
Credential
With
Sign
Up
(
input
:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
}
)
:
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
err
:
string
;
fetchResponse
:
Response
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_GENERATED_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Parameters
input:
{
email
:
string
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
}
email
:
string
Optional
options
?:
RecipeFunctionOptions
Optional
should
Try
Linking
With
Session
User
?:
boolean
user
Context
:
any
Returns
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
err
:
string
;
fetchResponse
:
Response
;
status
:
"INVALID_EMAIL_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_GENERATED_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
|
{
status
:
"AUTHENTICATOR_ALREADY_REGISTERED"
}
|
{
error
:
any
;
status
:
"FAILED_TO_REGISTER_USER"
}
|
{
error
:
any
;
status
:
"WEBAUTHN_NOT_SUPPORTED"
}
>
Static
remove
Credential
remove
Credential
(
input
:
{
userContext
:
any
;
webauthnCredentialId
:
string
}
)
:
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
fetchResponse
:
Response
;
status
:
"CREDENTIAL_NOT_FOUND_ERROR"
}
>
Parameters
input:
{
userContext
:
any
;
webauthnCredentialId
:
string
}
user
Context
:
any
webauthn
Credential
Id
:
string
Returns
Promise
<
GeneralErrorResponse
|
{
status
:
"OK"
}
|
{
fetchResponse
:
Response
;
status
:
"CREDENTIAL_NOT_FOUND_ERROR"
}
>
Static
sign
In
sign
In
(
input
:
{
credential
:
AuthenticationResponseJSON
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
)
:
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
>
Parameters
input:
{
credential
:
AuthenticationResponseJSON
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
credential
:
AuthenticationResponseJSON
Optional
options
?:
RecipeFunctionOptions
Optional
should
Try
Linking
With
Session
User
?:
boolean
user
Context
:
any
webauthn
Generated
Options
Id
:
string
Returns
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_IN_NOT_ALLOWED"
}
>
Static
sign
Up
sign
Up
(
input
:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
)
:
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
Parameters
input:
{
credential
:
RegistrationResponseJSON
;
options
?:
RecipeFunctionOptions
;
shouldTryLinkingWithSessionUser
?:
boolean
;
userContext
:
any
;
webauthnGeneratedOptionsId
:
string
}
credential
:
RegistrationResponseJSON
Optional
options
?:
RecipeFunctionOptions
Optional
should
Try
Linking
With
Session
User
?:
boolean
user
Context
:
any
webauthn
Generated
Options
Id
:
string
Returns
Promise
<
GeneralErrorResponse
|
{
fetchResponse
:
Response
;
status
:
"OK"
;
user
:
User
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"SIGN_UP_NOT_ALLOWED"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_CREDENTIALS_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"OPTIONS_NOT_FOUND_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"INVALID_OPTIONS_ERROR"
}
|
{
fetchResponse
:
Response
;
reason
:
string
;
status
:
"INVALID_AUTHENTICATOR_ERROR"
}
|
{
fetchResponse
:
Response
;
status
:
"EMAIL_ALREADY_EXISTS_ERROR"
}
>
Modules
date
Provider
index
recipe/auth
Recipe
recipe/emailpassword
recipe/emailverification
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/passwordless
recipe/recipe
Module
recipe/session
recipe/thirdparty
recipe/totp
recipe/userroles
recipe/webauthn
default
constructor
Components
Override
Provider
authenticate
Credential
authenticate
Credential
With
Sign
In
create
And
Register
Credential
For
Session
User
create
Credential
does
Browser
Support
Web
Authn
generate
Recover
Account
Token
get
Email
Exists
get
Register
Options
get
Sign
In
Options
init
list
Credentials
recover
Account
register
Credential
register
Credential
With
Recover
Account
register
Credential
With
Sign
Up
remove
Credential
sign
In
sign
Up
Generated using
TypeDoc