Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

WebauthnComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = Wrapper.ComponentsOverrideProvider

Functions

  • authenticateCredential(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 }
      • authenticationOptions: Omit<AuthenticationOptions, "status" | "fetchResponse">
      • userContext: any

    Returns Promise<{ authenticationResponse: AuthenticationResponseJSON; status: "OK" } | { error: any; status: "FAILED_TO_AUTHENTICATE_USER" } | { error: any; status: "WEBAUTHN_NOT_SUPPORTED" }>

  • authenticateCredentialWithSignIn(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 shouldTryLinkingWithSessionUser?: boolean
      • userContext: 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" }>

  • createAndRegisterCredentialForSessionUser(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
      • recipeUserId: string
      • userContext: 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" }>

  • createCredential(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 }
      • registrationOptions: Omit<RegistrationOptions, "status" | "fetchResponse">
      • userContext: any

    Returns Promise<{ registrationResponse: RegistrationResponseJSON; status: "OK" } | { status: "AUTHENTICATOR_ALREADY_REGISTERED" } | { error: any; status: "FAILED_TO_REGISTER_USER" } | { error: any; status: "WEBAUTHN_NOT_SUPPORTED" }>

  • doesBrowserSupportWebAuthn(input: { userContext: any }): Promise<{ browserSupportsWebauthn: boolean; platformAuthenticatorIsAvailable: boolean; status: "OK" } | { error: any; status: "ERROR" }>
  • Parameters

    • input: { userContext: any }
      • userContext: any

    Returns Promise<{ browserSupportsWebauthn: boolean; platformAuthenticatorIsAvailable: boolean; status: "OK" } | { error: any; status: "ERROR" }>

  • generateRecoverAccountToken(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
      • userContext: any

    Returns Promise<GeneralErrorResponse | { fetchResponse: Response; status: "OK" } | { fetchResponse: Response; reason: string; status: "RECOVER_ACCOUNT_NOT_ALLOWED" }>

  • getEmailExists(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
      • userContext: any

    Returns Promise<GeneralErrorResponse | { exists: boolean; fetchResponse: Response; status: "OK" }>

  • getRegisterOptions(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" }>

  • getSignInOptions(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
      • userContext: any

    Returns Promise<GeneralErrorResponse | { challenge: string; fetchResponse: Response; status: "OK"; timeout: number; userVerification: UserVerification; webauthnGeneratedOptionsId: string } | { fetchResponse: Response; status: "INVALID_OPTIONS_ERROR" }>

  • init(config?: UserInput): RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig>
  • Parameters

    • Optional config: UserInput

    Returns RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig>

  • listCredentials(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
      • userContext: any

    Returns Promise<GeneralErrorResponse | { credentials: { createdAt: number; recipeUserId: string; relyingPartyId: string; webauthnCredentialId: string }[]; status: "OK" }>

  • recoverAccount(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
      • userContext: any
      • webauthnGeneratedOptionsId: 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" }>

  • registerCredential(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
      • recipeUserId: string
      • userContext: any
      • webauthnGeneratedOptionsId: 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" }>

  • registerCredentialWithRecoverAccount(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
      • recoverAccountToken: string
      • userContext: 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" }>

  • registerCredentialWithSignUp(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 shouldTryLinkingWithSessionUser?: boolean
      • userContext: 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" }>

  • removeCredential(input: { userContext: any; webauthnCredentialId: string }): Promise<GeneralErrorResponse | { status: "OK" } | { fetchResponse: Response; status: "CREDENTIAL_NOT_FOUND_ERROR" }>
  • Parameters

    • input: { userContext: any; webauthnCredentialId: string }
      • userContext: any
      • webauthnCredentialId: string

    Returns Promise<GeneralErrorResponse | { status: "OK" } | { fetchResponse: Response; status: "CREDENTIAL_NOT_FOUND_ERROR" }>

  • signIn(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 shouldTryLinkingWithSessionUser?: boolean
      • userContext: any
      • webauthnGeneratedOptionsId: 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" }>

  • signUp(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 shouldTryLinkingWithSessionUser?: boolean
      • userContext: any
      • webauthnGeneratedOptionsId: 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" }>

Generated using TypeDoc