From 7b430a0ddd3b5ca7af7997aebabfaf4a3c3ef8d2 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Wed, 27 Nov 2024 18:51:29 +0100 Subject: [PATCH] adding dev-v0.41.3 tag to this commit to ensure building --- docs/classes/index.default.html | 2 +- docs/classes/recipe_authRecipe.default.html | 2 +- docs/classes/recipe_emailpassword.default.html | 2 +- docs/classes/recipe_emailverification.default.html | 2 +- docs/classes/recipe_multifactorauth.default.html | 2 +- docs/classes/recipe_multitenancy.default.html | 2 +- docs/classes/recipe_passwordless.default.html | 2 +- docs/classes/recipe_recipeModule.default.html | 2 +- docs/classes/recipe_session.BooleanClaim.html | 2 +- docs/classes/recipe_session.PrimitiveArrayClaim.html | 2 +- docs/classes/recipe_session.PrimitiveClaim.html | 2 +- docs/classes/recipe_session.default.html | 2 +- docs/classes/recipe_thirdparty.ActiveDirectory.html | 2 +- docs/classes/recipe_thirdparty.Apple.html | 2 +- docs/classes/recipe_thirdparty.Bitbucket.html | 2 +- docs/classes/recipe_thirdparty.BoxySAML.html | 2 +- docs/classes/recipe_thirdparty.Discord.html | 2 +- docs/classes/recipe_thirdparty.Facebook.html | 2 +- docs/classes/recipe_thirdparty.Github.html | 2 +- docs/classes/recipe_thirdparty.Gitlab.html | 2 +- docs/classes/recipe_thirdparty.Google.html | 2 +- docs/classes/recipe_thirdparty.GoogleWorkspaces.html | 2 +- docs/classes/recipe_thirdparty.LinkedIn.html | 2 +- docs/classes/recipe_thirdparty.Okta.html | 2 +- docs/classes/recipe_thirdparty.Twitter.html | 2 +- docs/classes/recipe_thirdparty.default.html | 2 +- docs/classes/recipe_thirdpartyemailpassword.default.html | 2 +- docs/classes/recipe_thirdpartypasswordless.default.html | 2 +- docs/classes/recipe_totp.default.html | 2 +- docs/classes/recipe_userroles.default.html | 2 +- docs/modules/index.html | 2 +- docs/modules/recipe_emailpassword.html | 4 ++-- docs/modules/recipe_emailverification.html | 4 ++-- docs/modules/recipe_multifactorauth.html | 2 +- docs/modules/recipe_multitenancy.html | 2 +- docs/modules/recipe_passwordless.html | 4 ++-- docs/modules/recipe_session.html | 4 ++-- docs/modules/recipe_thirdparty.html | 4 ++-- docs/modules/recipe_thirdpartyemailpassword.html | 4 ++-- docs/modules/recipe_thirdpartypasswordless.html | 4 ++-- docs/modules/recipe_totp.html | 2 +- 41 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/classes/index.default.html b/docs/classes/index.default.html index f4e1d7d9f..cba11ce79 100644 --- a/docs/classes/index.default.html +++ b/docs/classes/index.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

SuperTokensWrapper: FC<PropsWithChildren<{ userContext?: UserContext }>> = SuperTokensWrapper
useTranslation: (() => TranslationFunc) = useTranslation

Type declaration

    • (): TranslationFunc
    • Returns TranslationFunc

useUserContext: (() => UserContext) = useUserContext

Type declaration

    • (): UserContext
    • Returns UserContext

Methods

  • changeLanguage(language: string): Promise<void>
  • init(config: SuperTokensConfig): void
  • loadTranslation(store: TranslationStore): void
  • redirectToAuth(options?: { navigate?: Navigate; queryParams?: any; redirectBack?: boolean; show?: "signin" | "signup"; userContext?: UserContext }): Promise<void>
  • Parameters

    • Optional options: { navigate?: Navigate; queryParams?: any; redirectBack?: boolean; show?: "signin" | "signup"; userContext?: UserContext }
      • Optional navigate?: Navigate
      • Optional queryParams?: any
      • Optional redirectBack?: boolean
      • Optional show?: "signin" | "signup"
      • Optional userContext?: UserContext

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

SuperTokensWrapper: FC<PropsWithChildren<{ userContext?: UserContext }>> = SuperTokensWrapper
useTranslation: (() => TranslationFunc) = useTranslation

Type declaration

    • (): TranslationFunc
    • Returns TranslationFunc

useUserContext: (() => UserContext) = useUserContext

Type declaration

    • (): UserContext
    • Returns UserContext

Methods

  • changeLanguage(language: string): Promise<void>
  • init(config: SuperTokensConfig): void
  • loadTranslation(store: TranslationStore): void
  • redirectToAuth(options?: { navigate?: Navigate; queryParams?: any; redirectBack?: boolean; show?: "signin" | "signup"; userContext?: UserContext }): Promise<void>
  • Parameters

    • Optional options: { navigate?: Navigate; queryParams?: any; redirectBack?: boolean; show?: "signin" | "signup"; userContext?: UserContext }
      • Optional navigate?: Navigate
      • Optional queryParams?: any
      • Optional redirectBack?: boolean
      • Optional show?: "signin" | "signup"
      • Optional userContext?: UserContext

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_authRecipe.default.html b/docs/classes/recipe_authRecipe.default.html index 59723871a..4f4df93a0 100644 --- a/docs/classes/recipe_authRecipe.default.html +++ b/docs/classes/recipe_authRecipe.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default<T, Action, R, N> Abstract

Type Parameters

  • T

  • Action

  • R

  • N extends NormalisedConfig<T, Action, R | OnHandleEventContext>

Hierarchy

  • default<T, Action, R | OnHandleEventContext, N>
    • default

Index

Constructors

  • new default<T, Action, R, N>(config: NormalisedConfigWithAppInfoAndRecipeID<N>): default<T, Action, R, N>

Properties

config: NormalisedConfigWithAppInfoAndRecipeID<N>
firstFactorIds: string[]
recipeID: string

Methods

  • doesSessionExist(input?: { userContext?: UserContext }): Promise<boolean>
  • getAuthRecipeDefaultRedirectionURL(_context: T): Promise<string>
  • getDefaultRedirectionURL(_: T, _userContext: UserContext): Promise<string>
  • getRedirectUrl(context: GetRedirectionURLContextType, userContext: UserContext): Promise<null | string>
  • redirect(context: GetRedirectionURLContextType, navigate?: Navigate, queryParams?: Record<string, string>, userContext?: UserContext): Promise<void>
  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default<T, Action, R, N> Abstract

Type Parameters

  • T

  • Action

  • R

  • N extends NormalisedConfig<T, Action, R | OnHandleEventContext>

Hierarchy

  • default<T, Action, R | OnHandleEventContext, N>
    • default

Index

Constructors

  • new default<T, Action, R, N>(config: NormalisedConfigWithAppInfoAndRecipeID<N>): default<T, Action, R, N>

Properties

config: NormalisedConfigWithAppInfoAndRecipeID<N>
firstFactorIds: string[]
recipeID: string

Methods

  • doesSessionExist(input?: { userContext?: UserContext }): Promise<boolean>
  • getAuthRecipeDefaultRedirectionURL(_context: T): Promise<string>
  • getDefaultRedirectionURL(_: T, _userContext: UserContext): Promise<string>
  • getRedirectUrl(context: GetRedirectionURLContextType, userContext: UserContext): Promise<null | string>
  • redirect(context: GetRedirectionURLContextType, navigate?: Navigate, queryParams?: Record<string, string>, userContext?: UserContext): Promise<void>
  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_emailpassword.default.html b/docs/classes/recipe_emailpassword.default.html index 547674b2f..5a0fcf843 100644 --- a/docs/classes/recipe_emailpassword.default.html +++ b/docs/classes/recipe_emailpassword.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getResetPasswordTokenFromURL(input?: { userContext?: UserContext }): string
  • sendPasswordResetEmail(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

  • signIn(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>

  • signOut(input?: { userContext?: UserContext }): Promise<void>
  • signUp(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>

  • submitNewPassword(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getResetPasswordTokenFromURL(input?: { userContext?: UserContext }): string
  • sendPasswordResetEmail(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

  • signIn(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>

  • signOut(input?: { userContext?: UserContext }): Promise<void>
  • signUp(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>

  • submitNewPassword(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_emailverification.default.html b/docs/classes/recipe_emailverification.default.html index 9d4311a3b..995d2427f 100644 --- a/docs/classes/recipe_emailverification.default.html +++ b/docs/classes/recipe_emailverification.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider
EmailVerificationClaim: EmailVerificationClaimClass = EmailVerificationRecipe.EmailVerificationClaim

Methods

  • getEmailVerificationTokenFromURL(input?: { userContext?: UserContext }): string
  • isEmailVerified(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>

  • sendVerificationEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • verifyEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider
EmailVerificationClaim: EmailVerificationClaimClass = EmailVerificationRecipe.EmailVerificationClaim

Methods

  • getEmailVerificationTokenFromURL(input?: { userContext?: UserContext }): string
  • isEmailVerified(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; isVerified: boolean; status: "OK" }>

  • sendVerificationEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • verifyEmail(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_multifactorauth.default.html b/docs/classes/recipe_multifactorauth.default.html index e249fcbfe..fe19c1faa 100644 --- a/docs/classes/recipe_multifactorauth.default.html +++ b/docs/classes/recipe_multifactorauth.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider
FactorIds: { EMAILPASSWORD: string; LINK_EMAIL: string; LINK_PHONE: string; OTP_EMAIL: string; OTP_PHONE: string; THIRDPARTY: string; TOTP: string } = FactorIds

Type declaration

  • EMAILPASSWORD: string
  • LINK_EMAIL: string
  • LINK_PHONE: string
  • OTP_EMAIL: string
  • OTP_PHONE: string
  • THIRDPARTY: string
  • TOTP: string
MultiFactorAuthClaim: MultiFactorAuthClaimClass = MultiFactorAuthRecipe.MultiFactorAuthClaim

Methods

  • redirectToFactor(factorId: string, forceSetup?: boolean, redirectBack?: boolean, navigate?: Navigate, userContext?: UserContext): Promise<void>
  • Parameters

    • factorId: string
    • forceSetup: boolean = false
    • redirectBack: boolean = true
    • Optional navigate: Navigate
    • Optional userContext: UserContext

    Returns Promise<void>

  • redirectToFactorChooser(redirectBack?: boolean, nextFactorOptions?: string[], navigate?: Navigate, userContext?: UserContext): Promise<void>
  • resyncSessionAndFetchMFAInfo(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider
FactorIds: { EMAILPASSWORD: string; LINK_EMAIL: string; LINK_PHONE: string; OTP_EMAIL: string; OTP_PHONE: string; THIRDPARTY: string; TOTP: string } = FactorIds

Type declaration

  • EMAILPASSWORD: string
  • LINK_EMAIL: string
  • LINK_PHONE: string
  • OTP_EMAIL: string
  • OTP_PHONE: string
  • THIRDPARTY: string
  • TOTP: string
MultiFactorAuthClaim: MultiFactorAuthClaimClass = MultiFactorAuthRecipe.MultiFactorAuthClaim

Methods

  • redirectToFactor(factorId: string, forceSetup?: boolean, redirectBack?: boolean, navigate?: Navigate, userContext?: UserContext): Promise<void>
  • Parameters

    • factorId: string
    • forceSetup: boolean = false
    • redirectBack: boolean = true
    • Optional navigate: Navigate
    • Optional userContext: UserContext

    Returns Promise<void>

  • redirectToFactorChooser(redirectBack?: boolean, nextFactorOptions?: string[], navigate?: Navigate, userContext?: UserContext): Promise<void>
  • resyncSessionAndFetchMFAInfo(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ emails: Record<string, undefined | string[]>; factors: MFAFactorInfo; fetchResponse: Response; phoneNumbers: Record<string, undefined | string[]>; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_multitenancy.default.html b/docs/classes/recipe_multitenancy.default.html index 9b37cac51..0440d3c56 100644 --- a/docs/classes/recipe_multitenancy.default.html +++ b/docs/classes/recipe_multitenancy.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

AllowedDomainsClaim: AllowedDomainsClaimClass = AllowedDomainsClaim
ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • init(config?: UserInput): RecipeInitResult<any, any, any, any>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

AllowedDomainsClaim: AllowedDomainsClaimClass = AllowedDomainsClaim
ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • init(config?: UserInput): RecipeInitResult<any, any, any, any>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_passwordless.default.html b/docs/classes/recipe_passwordless.default.html index 9499abc61..ab0fb084c 100644 --- a/docs/classes/recipe_passwordless.default.html +++ b/docs/classes/recipe_passwordless.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • clearLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
  • consumeCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • createCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

    Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • doesPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • phoneNumber: string
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getLinkCodeFromURL(input?: { userContext?: UserContext }): string
  • getLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
  • Type Parameters

    • CustomLoginAttemptInfoProperties

    Parameters

    • Optional input: { userContext?: UserContext }
      • Optional userContext?: UserContext

    Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

  • getPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
  • resendCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • setLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
  • Type Parameters

    • CustomStateProperties

    Parameters

    • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
      • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
      • Optional userContext?: UserContext

    Returns Promise<void>

  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

ComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = RecipeComponentsOverrideContextProvider

Methods

  • clearLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
  • consumeCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • createCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

    Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • doesPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • phoneNumber: string
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getLinkCodeFromURL(input?: { userContext?: UserContext }): string
  • getLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
  • Type Parameters

    • CustomLoginAttemptInfoProperties

    Parameters

    • Optional input: { userContext?: UserContext }
      • Optional userContext?: UserContext

    Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

  • getPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
  • resendCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • setLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
  • Type Parameters

    • CustomStateProperties

    Parameters

    • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
      • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
      • Optional userContext?: UserContext

    Returns Promise<void>

  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_recipeModule.default.html b/docs/classes/recipe_recipeModule.default.html index c9356e073..9afee429e 100644 --- a/docs/classes/recipe_recipeModule.default.html +++ b/docs/classes/recipe_recipeModule.default.html @@ -1 +1 @@ -default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N> Abstract

Type Parameters

  • GetRedirectionURLContextType

  • Action

  • OnHandleEventContextType

  • N extends NormalisedConfig<GetRedirectionURLContextType, Action, OnHandleEventContextType>

Hierarchy

  • BaseRecipeModule<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>

Index

Constructors

  • new default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>(config: NormalisedConfigWithAppInfoAndRecipeID<N>): default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>
  • Type Parameters

    • GetRedirectionURLContextType

    • Action

    • OnHandleEventContextType

    • N extends NormalisedConfig<GetRedirectionURLContextType, Action, OnHandleEventContextType>

    Parameters

    • config: NormalisedConfigWithAppInfoAndRecipeID<N>

    Returns default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>

Properties

config: NormalisedConfigWithAppInfoAndRecipeID<N>
recipeID: string

Methods

  • getDefaultRedirectionURL(_: GetRedirectionURLContextType, _userContext: UserContext): Promise<string>
  • getRedirectUrl(context: GetRedirectionURLContextType, userContext: UserContext): Promise<null | string>
  • redirect(context: GetRedirectionURLContextType, navigate?: Navigate, queryParams?: Record<string, string>, userContext?: UserContext): Promise<void>
  • Parameters

    • context: GetRedirectionURLContextType
    • Optional navigate: Navigate
    • Optional queryParams: Record<string, string>
    • Optional userContext: UserContext

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N> Abstract

Type Parameters

  • GetRedirectionURLContextType

  • Action

  • OnHandleEventContextType

  • N extends NormalisedConfig<GetRedirectionURLContextType, Action, OnHandleEventContextType>

Hierarchy

  • BaseRecipeModule<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>

Index

Constructors

  • new default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>(config: NormalisedConfigWithAppInfoAndRecipeID<N>): default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>
  • Type Parameters

    • GetRedirectionURLContextType

    • Action

    • OnHandleEventContextType

    • N extends NormalisedConfig<GetRedirectionURLContextType, Action, OnHandleEventContextType>

    Parameters

    • config: NormalisedConfigWithAppInfoAndRecipeID<N>

    Returns default<GetRedirectionURLContextType, Action, OnHandleEventContextType, N>

Properties

config: NormalisedConfigWithAppInfoAndRecipeID<N>
recipeID: string

Methods

  • getDefaultRedirectionURL(_: GetRedirectionURLContextType, _userContext: UserContext): Promise<string>
  • getRedirectUrl(context: GetRedirectionURLContextType, userContext: UserContext): Promise<null | string>
  • redirect(context: GetRedirectionURLContextType, navigate?: Navigate, queryParams?: Record<string, string>, userContext?: UserContext): Promise<void>
  • Parameters

    • context: GetRedirectionURLContextType
    • Optional navigate: Navigate
    • Optional queryParams: Record<string, string>
    • Optional userContext: UserContext

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_session.BooleanClaim.html b/docs/classes/recipe_session.BooleanClaim.html index 730cd52a1..98eaa334f 100644 --- a/docs/classes/recipe_session.BooleanClaim.html +++ b/docs/classes/recipe_session.BooleanClaim.html @@ -1,3 +1,3 @@ -BooleanClaim | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BooleanClaim
    • BooleanClaim

Index

Constructors

  • new BooleanClaim(config: PrimitiveClaimConfig & { onFailureRedirection?: ValidationFailureCallback; showAccessDeniedOnFailure?: boolean }): BooleanClaim
  • Parameters

    • config: PrimitiveClaimConfig & { onFailureRedirection?: ValidationFailureCallback; showAccessDeniedOnFailure?: boolean }

    Returns BooleanClaim

Properties

defaultMaxAgeInSeconds: undefined | number
id: string
refresh: ((userContext: any) => Promise<void>)

Type declaration

UserInput: { override?: { functions?: any } } & RecipeModuleUserInput<any, PreAndPostAPIHookAction, any>

Variables

AllowedDomainsClaim: AllowedDomainsClaimClass
MultitenancyComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = Wrapper.ComponentsOverrideProvider

Functions

  • init(config?: UserInput): RecipeInitResult<any, any, any, any>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_passwordless.html b/docs/modules/recipe_passwordless.html index e978beed3..0d22e58f4 100644 --- a/docs/modules/recipe_passwordless.html +++ b/docs/modules/recipe_passwordless.html @@ -1,4 +1,4 @@ -recipe/passwordless | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

GetRedirectionURLContext: never
OnHandleEventContext: { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; rid: "passwordless"; user: User } | { action: "PASSWORDLESS_RESTART_FLOW" } | { action: "PASSWORDLESS_CODE_SENT"; isResend: boolean } | AuthRecipeModuleOnHandleEventContext
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
RecipeInterface: { clearLoginAttemptInfo: any; consumeCode: any; createCode: any; doesEmailExist: any; doesPhoneNumberExist: any; getLinkCodeFromURL: any; getLoginAttemptInfo: any; getPreAuthSessionIdFromURL: any; getTenantIdFromURL: any; resendCode: any; setLoginAttemptInfo: any }

Type declaration

  • clearLoginAttemptInfo:function
    • clearLoginAttemptInfo(input: { userContext: any }): Promise<void>
    • +recipe/passwordless | supertokens-auth-react
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Index

      Type Aliases

      GetRedirectionURLContext: never
      OnHandleEventContext: { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; rid: "passwordless"; user: User } | { action: "PASSWORDLESS_RESTART_FLOW" } | { action: "PASSWORDLESS_CODE_SENT"; isResend: boolean } | AuthRecipeModuleOnHandleEventContext
      PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string }

      Type declaration

      • action: PreAndPostAPIHookAction
      • requestInit: RequestInit
      • url: string
      RecipeInterface: { clearLoginAttemptInfo: any; consumeCode: any; createCode: any; doesEmailExist: any; doesPhoneNumberExist: any; getLinkCodeFromURL: any; getLoginAttemptInfo: any; getPreAuthSessionIdFromURL: any; getTenantIdFromURL: any; resendCode: any; setLoginAttemptInfo: any }

      Type declaration

      • clearLoginAttemptInfo:function
        • clearLoginAttemptInfo(input: { userContext: any }): Promise<void>
        • Clear any information about login attempts from storage

          Parameters

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

          Returns Promise<void>

      • consumeCode:function
        • consumeCode(input: { deviceId: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any; userInputCode: string } | { linkCode: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
        • Log the user in using the input code or link code

          @@ -34,4 +34,4 @@

          Parameters

          • input: { deviceId: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any }
            • deviceId: string
            • Optional options?: RecipeFunctionOptions
            • preAuthSessionId: string
            • tenantId: string | undefined
            • userContext: any

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

          {status: "OK"} if succesful

      • setLoginAttemptInfo:function
        • setLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomStateProperties; userContext: any }): Promise<void>
        • Set information about the current login attempt to storage

          -

          Type Parameters

          • CustomStateProperties

          Parameters

          • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomStateProperties; userContext: any }
            • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomStateProperties
            • userContext: any

          Returns Promise<void>

      UserInput: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; mfaFeature?: PasswordlessFeatureBaseConfig; override?: { functions?: any } } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

      Variables

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

      Functions

      • clearLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
      • consumeCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

        Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      • createCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

        Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
      • Parameters

        • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
          • email: string
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

      • doesPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
      • Parameters

        • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • phoneNumber: string
          • Optional userContext?: UserContext

        Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

      • getLinkCodeFromURL(input?: { userContext?: UserContext }): string
      • getLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
      • Type Parameters

        • CustomLoginAttemptInfoProperties

        Parameters

        • Optional input: { userContext?: UserContext }
          • Optional userContext?: UserContext

        Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

      • getPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
      • resendCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

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

      • setLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
      • Type Parameters

        • CustomStateProperties

        Parameters

        • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
          • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
          • Optional userContext?: UserContext

        Returns Promise<void>

      • signOut(input?: { userContext?: UserContext }): Promise<void>

      Legend

      • Variable
      • Function
      • Function with type parameter
      • Type alias
      • Class
      • Class with type parameter

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +

      Type Parameters

      • CustomStateProperties

      Parameters

      • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomStateProperties; userContext: any }
        • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string; tenantId?: string } & CustomStateProperties
        • userContext: any

      Returns Promise<void>

UserInput: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; mfaFeature?: PasswordlessFeatureBaseConfig; override?: { functions?: any } } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • clearLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
  • consumeCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • createCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

    Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • doesPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • phoneNumber: string
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getLinkCodeFromURL(input?: { userContext?: UserContext }): string
  • getLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
  • Type Parameters

    • CustomLoginAttemptInfoProperties

    Parameters

    • Optional input: { userContext?: UserContext }
      • Optional userContext?: UserContext

    Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

  • getPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
  • resendCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • setLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
  • Type Parameters

    • CustomStateProperties

    Parameters

    • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
      • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
      • Optional userContext?: UserContext

    Returns Promise<void>

  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_session.html b/docs/modules/recipe_session.html index 11754884e..a8d9e421b 100644 --- a/docs/modules/recipe_session.html +++ b/docs/modules/recipe_session.html @@ -1,8 +1,8 @@ -recipe/session | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

ClaimValidationError: { id: string; reason?: any }

Type declaration

  • id: string
  • Optional reason?: any
ClaimValidationResult: { isValid: true } | { isValid: false; reason?: any }
InputType: WebJSInputType & { accessDeniedScreen?: SessionFeatureBaseConfig; style?: string; useShadowDom?: boolean; onHandleEvent?: any }
RecipeInterface: { addAxiosInterceptors: any; addFetchInterceptorsAndReturnModifiedFetch: any; addXMLHttpRequestInterceptor: any; calculateClockSkewInMillis: any; doesSessionExist: any; getAccessTokenPayloadSecurely: any; getGlobalClaimValidators: any; getInvalidClaimsFromResponse: any; getUserId: any; shouldDoInterceptionBasedOnUrl: any; signOut: any; validateClaims: any }

Type declaration

  • addAxiosInterceptors:function
    • addAxiosInterceptors(input: { axiosInstance: any; userContext: any }): void
    • Parameters

      • input: { axiosInstance: any; userContext: any }
        • axiosInstance: any
        • userContext: any

      Returns void

  • addFetchInterceptorsAndReturnModifiedFetch:function
    • addFetchInterceptorsAndReturnModifiedFetch(input: { originalFetch: any; userContext: any }): ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
    • Parameters

      • input: { originalFetch: any; userContext: any }
        • originalFetch: any
        • userContext: any

      Returns ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

        • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
        • Parameters

          • input: URL | RequestInfo
          • Optional init: RequestInit

          Returns Promise<Response>

  • addXMLHttpRequestInterceptor:function
    • addXMLHttpRequestInterceptor(input: { userContext: any }): void
    • Parameters

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

      Returns void

  • calculateClockSkewInMillis:function
    • calculateClockSkewInMillis(params: { accessTokenPayload: any; responseHeaders: Headers }): number
    • Parameters

      • params: { accessTokenPayload: any; responseHeaders: Headers }
        • accessTokenPayload: any
        • responseHeaders: Headers

      Returns number

  • doesSessionExist:function
    • doesSessionExist(input: { userContext: any }): Promise<boolean>
    • Parameters

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

      Returns Promise<boolean>

  • getAccessTokenPayloadSecurely:function
    • getAccessTokenPayloadSecurely(input: { userContext: any }): Promise<any>
    • Parameters

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

      Returns Promise<any>

  • getGlobalClaimValidators:function
  • getInvalidClaimsFromResponse:function
    • getInvalidClaimsFromResponse(input: { response: { data: any } | Response; userContext: any }): Promise<ClaimValidationError[]>
    • Parameters

      • input: { response: { data: any } | Response; userContext: any }
        • response: { data: any } | Response
        • userContext: any

      Returns Promise<ClaimValidationError[]>

  • getUserId:function
    • getUserId(input: { userContext: any }): Promise<string>
    • Parameters

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

      Returns Promise<string>

  • shouldDoInterceptionBasedOnUrl:function
    • shouldDoInterceptionBasedOnUrl(toCheckUrl: string, apiDomain: string, sessionTokenBackendDomain: undefined | string): boolean
    • Parameters

      • toCheckUrl: string
      • apiDomain: string
      • sessionTokenBackendDomain: undefined | string

      Returns boolean

  • signOut:function
    • signOut(input: { userContext: any }): Promise<void>
    • Parameters

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

      Returns Promise<void>

  • validateClaims:function
SessionClaim<ValueType>: { getLastFetchedTime: any; getValueFromPayload: any; refresh: any }

Type Parameters

  • ValueType

Type declaration

  • getLastFetchedTime:function
    • getLastFetchedTime(payload: any, _userContext?: any): undefined | number
    • Parameters

      • payload: any
      • Optional _userContext: any

      Returns undefined | number

  • getValueFromPayload:function
    • getValueFromPayload(payload: any, _userContext?: any): undefined | ValueType
    • Parameters

      • payload: any
      • Optional _userContext: any

      Returns undefined | ValueType

  • refresh:function
    • refresh(userContext: any): Promise<void>
    • Parameters

      • userContext: any

      Returns Promise<void>

SessionClaimValidator: { id: string; refresh: any; shouldRefresh: any; validate: any }

Type declaration

  • Readonly id: string
  • refresh:function
    • refresh(userContext: any): Promise<void>
    • +recipe/session | supertokens-auth-react
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Index

      Type Aliases

      ClaimValidationError: { id: string; reason?: any }

      Type declaration

      • id: string
      • Optional reason?: any
      ClaimValidationResult: { isValid: true } | { isValid: false; reason?: any }
      InputType: WebJSInputType & { accessDeniedScreen?: SessionFeatureBaseConfig; style?: string; useShadowDom?: boolean; onHandleEvent?: any }
      RecipeInterface: { addAxiosInterceptors: any; addFetchInterceptorsAndReturnModifiedFetch: any; addXMLHttpRequestInterceptor: any; calculateClockSkewInMillis: any; doesSessionExist: any; getAccessTokenPayloadSecurely: any; getGlobalClaimValidators: any; getInvalidClaimsFromResponse: any; getUserId: any; shouldDoInterceptionBasedOnUrl: any; signOut: any; validateClaims: any }

      Type declaration

      • addAxiosInterceptors:function
        • addAxiosInterceptors(input: { axiosInstance: any; userContext: any }): void
        • Parameters

          • input: { axiosInstance: any; userContext: any }
            • axiosInstance: any
            • userContext: any

          Returns void

      • addFetchInterceptorsAndReturnModifiedFetch:function
        • addFetchInterceptorsAndReturnModifiedFetch(input: { originalFetch: any; userContext: any }): ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
        • Parameters

          • input: { originalFetch: any; userContext: any }
            • originalFetch: any
            • userContext: any

          Returns ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

            • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
            • Parameters

              • input: URL | RequestInfo
              • Optional init: RequestInit

              Returns Promise<Response>

      • addXMLHttpRequestInterceptor:function
        • addXMLHttpRequestInterceptor(input: { userContext: any }): void
        • Parameters

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

          Returns void

      • calculateClockSkewInMillis:function
        • calculateClockSkewInMillis(params: { accessTokenPayload: any; responseHeaders: Headers }): number
        • Parameters

          • params: { accessTokenPayload: any; responseHeaders: Headers }
            • accessTokenPayload: any
            • responseHeaders: Headers

          Returns number

      • doesSessionExist:function
        • doesSessionExist(input: { userContext: any }): Promise<boolean>
        • Parameters

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

          Returns Promise<boolean>

      • getAccessTokenPayloadSecurely:function
        • getAccessTokenPayloadSecurely(input: { userContext: any }): Promise<any>
        • Parameters

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

          Returns Promise<any>

      • getGlobalClaimValidators:function
      • getInvalidClaimsFromResponse:function
        • getInvalidClaimsFromResponse(input: { response: { data: any } | Response; userContext: any }): Promise<ClaimValidationError[]>
        • Parameters

          • input: { response: { data: any } | Response; userContext: any }
            • response: { data: any } | Response
            • userContext: any

          Returns Promise<ClaimValidationError[]>

      • getUserId:function
        • getUserId(input: { userContext: any }): Promise<string>
        • Parameters

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

          Returns Promise<string>

      • shouldDoInterceptionBasedOnUrl:function
        • shouldDoInterceptionBasedOnUrl(toCheckUrl: string, apiDomain: string, sessionTokenBackendDomain: undefined | string): boolean
        • Parameters

          • toCheckUrl: string
          • apiDomain: string
          • sessionTokenBackendDomain: undefined | string

          Returns boolean

      • signOut:function
        • signOut(input: { userContext: any }): Promise<void>
        • Parameters

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

          Returns Promise<void>

      • validateClaims:function
      SessionClaim<ValueType>: { getLastFetchedTime: any; getValueFromPayload: any; refresh: any }

      Type Parameters

      • ValueType

      Type declaration

      • getLastFetchedTime:function
        • getLastFetchedTime(payload: any, _userContext?: any): undefined | number
        • Parameters

          • payload: any
          • Optional _userContext: any

          Returns undefined | number

      • getValueFromPayload:function
        • getValueFromPayload(payload: any, _userContext?: any): undefined | ValueType
        • Parameters

          • payload: any
          • Optional _userContext: any

          Returns undefined | ValueType

      • refresh:function
        • refresh(userContext: any): Promise<void>
        • Parameters

          • userContext: any

          Returns Promise<void>

      SessionClaimValidator: { id: string; refresh: any; shouldRefresh: any; validate: any }

      Type declaration

      • Readonly id: string
      • refresh:function
        • refresh(userContext: any): Promise<void>
        • Makes an API call that will refresh the claim in the token.

          Parameters

          • userContext: any

          Returns Promise<void>

      • shouldRefresh:function
        • shouldRefresh(accessTokenPayload: any, userContext: any): boolean | Promise<boolean>
        • Decides if we need to refresh the claim value before checking the payload with validate. E.g.: if the information in the payload is expired, or is not sufficient for this validator.

          Parameters

          • accessTokenPayload: any
          • userContext: any

          Returns boolean | Promise<boolean>

      • validate:function
        • Decides if the claim is valid based on the accessTokenPayload object (and not checking DB or anything else)

          -

          Parameters

          • accessTokenPayload: any
          • userContext: any

          Returns ClaimValidationResult | Promise<ClaimValidationResult>

      SessionContextType: LoadedSessionContext | { loading: true }

      Variables

      SessionAuth: FC<PropsWithChildren<SessionAuthProps & { userContext?: UserContext }>> = SessionAPIWrapper.SessionAuth
      SessionComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = SessionAPIWrapper.ComponentsOverrideProvider
      SessionContext: Context<{ accessDeniedValidatorError?: ClaimValidationError; invalidClaims: ClaimValidationError[]; loading: false } & SessionContextUpdate & { isDefault?: boolean } & { loading: true } & { isDefault?: boolean }> = ...

      Functions

      • addAxiosInterceptors(axiosInstance: any, userContext?: UserContext): void
      • attemptRefreshingSession(): Promise<boolean>
      • doesSessionExist(input?: { userContext?: UserContext }): Promise<boolean>
      • getAccessToken(input?: { userContext?: UserContext }): Promise<undefined | string>
      • getAccessTokenPayloadSecurely(input?: { userContext?: UserContext }): Promise<any>
      • getClaimValue<T>(input: { claim: SessionClaim<T>; userContext?: UserContext }): Promise<undefined | T>
      • getInvalidClaimsFromResponse(input: { response: Response | { data: any }; userContext: UserContext }): Promise<ClaimValidationError[]>
      • getUserId(input?: { userContext?: UserContext }): Promise<string>
      • init(config?: InputType): RecipeInitResult<unknown, unknown, unknown, any>
      • signOut(input?: { userContext?: UserContext }): Promise<void>
      • useClaimValue<T>(claim: SessionClaim<T>): { loading: true } | { doesSessionExist: boolean; loading: false; value: undefined | T }

      Legend

      • Variable
      • Function
      • Function with type parameter
      • Type alias
      • Class
      • Class with type parameter

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +

      Parameters

      • accessTokenPayload: any
      • userContext: any

      Returns ClaimValidationResult | Promise<ClaimValidationResult>

SessionContextType: LoadedSessionContext | { loading: true }

Variables

SessionAuth: FC<PropsWithChildren<SessionAuthProps & { userContext?: UserContext }>> = SessionAPIWrapper.SessionAuth
SessionComponentsOverrideProvider: FC<PropsWithChildren<{ components: ComponentOverrideMap }>> = SessionAPIWrapper.ComponentsOverrideProvider
SessionContext: Context<{ accessDeniedValidatorError?: ClaimValidationError; invalidClaims: ClaimValidationError[]; loading: false } & SessionContextUpdate & { isDefault?: boolean } & { loading: true } & { isDefault?: boolean }> = ...

Functions

  • addAxiosInterceptors(axiosInstance: any, userContext?: UserContext): void
  • attemptRefreshingSession(): Promise<boolean>
  • doesSessionExist(input?: { userContext?: UserContext }): Promise<boolean>
  • getAccessToken(input?: { userContext?: UserContext }): Promise<undefined | string>
  • getAccessTokenPayloadSecurely(input?: { userContext?: UserContext }): Promise<any>
  • getClaimValue<T>(input: { claim: SessionClaim<T>; userContext?: UserContext }): Promise<undefined | T>
  • getInvalidClaimsFromResponse(input: { response: Response | { data: any }; userContext: UserContext }): Promise<ClaimValidationError[]>
  • getUserId(input?: { userContext?: UserContext }): Promise<string>
  • init(config?: InputType): RecipeInitResult<unknown, unknown, unknown, any>
  • signOut(input?: { userContext?: UserContext }): Promise<void>
  • useClaimValue<T>(claim: SessionClaim<T>): { loading: true } | { doesSessionExist: boolean; loading: false; value: undefined | T }

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_thirdparty.html b/docs/modules/recipe_thirdparty.html index 578def78f..0e6306135 100644 --- a/docs/modules/recipe_thirdparty.html +++ b/docs/modules/recipe_thirdparty.html @@ -1,4 +1,4 @@ -recipe/thirdparty | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

GetRedirectionURLContext: never
OnHandleEventContext: AuthRecipeModuleOnHandleEventContext | { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; rid: "thirdparty"; user: User; userContext: UserContext }
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
  • userContext: UserContext
RecipeInterface: { generateStateToSendToOAuthProvider: any; getAuthErrorFromURL: any; getAuthStateFromURL: any; getAuthorisationURLFromBackend: any; getAuthorisationURLWithQueryParamsAndSetState: any; getStateAndOtherInfoFromStorage: any; setStateAndOtherInfoToStorage: any; signInAndUp: any; verifyAndGetStateOrThrowError: any }

Type declaration

  • generateStateToSendToOAuthProvider:function
    • generateStateToSendToOAuthProvider(input?: { frontendRedirectURI?: string; userContext: any }): string
    • +recipe/thirdparty | supertokens-auth-react
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Index

      Type Aliases

      GetRedirectionURLContext: never
      OnHandleEventContext: AuthRecipeModuleOnHandleEventContext | { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; rid: "thirdparty"; user: User; userContext: UserContext }
      PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

      Type declaration

      • action: PreAndPostAPIHookAction
      • requestInit: RequestInit
      • url: string
      • userContext: UserContext
      RecipeInterface: { generateStateToSendToOAuthProvider: any; getAuthErrorFromURL: any; getAuthStateFromURL: any; getAuthorisationURLFromBackend: any; getAuthorisationURLWithQueryParamsAndSetState: any; getStateAndOtherInfoFromStorage: any; setStateAndOtherInfoToStorage: any; signInAndUp: any; verifyAndGetStateOrThrowError: any }

      Type declaration

      • generateStateToSendToOAuthProvider:function
        • generateStateToSendToOAuthProvider(input?: { frontendRedirectURI?: string; userContext: any }): string
        • Generate a new state that will be sent to the third party provider

          Parameters

          • Optional input: { frontendRedirectURI?: string; userContext: any }
            • Optional frontendRedirectURI?: string
            • userContext: any

          Returns string

          string

      • getAuthErrorFromURL:function
        • getAuthErrorFromURL(input: { userContext: any }): undefined | string
        • @@ -26,4 +26,4 @@

          Parameters

          • input: { options?: RecipeFunctionOptions; userContext: any }
            • Optional options?: RecipeFunctionOptions
            • userContext: any

          Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; tenantId?: string; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

          {status: OK, user, createdNewRecipeUser: boolean} if succesful

      • verifyAndGetStateOrThrowError:function
        • verifyAndGetStateOrThrowError<CustomStateProperties>(input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }): Promise<StateObject & CustomStateProperties>
        • Verify that the state recieved from the third party provider matches the one in storage

          -

          Type Parameters

          • CustomStateProperties

          Parameters

          • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
            • stateFromAuthProvider: string | undefined
            • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
            • userContext: any

          Returns Promise<StateObject & CustomStateProperties>

      UserInput: { oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any }; signInAndUpFeature?: SignInAndUpFeatureUserInput } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

      Variables

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

      Functions

      • getAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
      • Parameters

        • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
          • frontendRedirectURI: string
          • Optional options?: RecipeFunctionOptions
          • Optional redirectURIOnProviderDashboard?: string
          • thirdPartyId: string
          • Optional userContext?: UserContext

        Returns Promise<string>

      • getStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
      • Type Parameters

        • CustomStateProperties

        Parameters

        • Optional input: { userContext?: UserContext }
          • Optional userContext?: UserContext

        Returns undefined | StateObject & CustomStateProperties

      • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
      • Parameters

        • input: { thirdPartyId: string; userContext?: UserContext }
          • thirdPartyId: string
          • Optional userContext?: UserContext

        Returns Promise<{ status: "OK" | "ERROR" }>

      • signInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      • signOut(input?: { userContext?: UserContext }): Promise<void>

      Legend

      • Variable
      • Function
      • Function with type parameter
      • Type alias
      • Class
      • Class with type parameter

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +

      Type Parameters

      • CustomStateProperties

      Parameters

      • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
        • stateFromAuthProvider: string | undefined
        • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
        • userContext: any

      Returns Promise<StateObject & CustomStateProperties>

UserInput: { oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any }; signInAndUpFeature?: SignInAndUpFeatureUserInput } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • getAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
  • Parameters

    • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
      • frontendRedirectURI: string
      • Optional options?: RecipeFunctionOptions
      • Optional redirectURIOnProviderDashboard?: string
      • thirdPartyId: string
      • Optional userContext?: UserContext

    Returns Promise<string>

  • getStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
  • Type Parameters

    • CustomStateProperties

    Parameters

    • Optional input: { userContext?: UserContext }
      • Optional userContext?: UserContext

    Returns undefined | StateObject & CustomStateProperties

  • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
  • Parameters

    • input: { thirdPartyId: string; userContext?: UserContext }
      • thirdPartyId: string
      • Optional userContext?: UserContext

    Returns Promise<{ status: "OK" | "ERROR" }>

  • signInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • signOut(input?: { userContext?: UserContext }): Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_thirdpartyemailpassword.html b/docs/modules/recipe_thirdpartyemailpassword.html index d676dbd15..242eec083 100644 --- a/docs/modules/recipe_thirdpartyemailpassword.html +++ b/docs/modules/recipe_thirdpartyemailpassword.html @@ -1,4 +1,4 @@ -recipe/thirdpartyemailpassword | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/thirdpartyemailpassword

Index

References

Re-exports ActiveDirectory
Re-exports Apple
Re-exports Bitbucket
Re-exports BoxySAML
Re-exports Discord
Re-exports Facebook
Re-exports Github
Re-exports Gitlab
Re-exports Google
Re-exports GoogleWorkspaces
Re-exports LinkedIn
Re-exports Okta
Re-exports Twitter

Type Aliases

RecipeInterface: { doesEmailExist: any; emailPasswordSignIn: any; emailPasswordSignUp: any; generateStateToSendToOAuthProvider: any; getAuthErrorFromURL: any; getAuthStateFromURL: any; getAuthorisationURLFromBackend: any; getAuthorisationURLWithQueryParamsAndSetState: any; getResetPasswordTokenFromURL: any; getStateAndOtherInfoFromStorage: any; getTenantIdFromURL: any; sendPasswordResetEmail: any; setStateAndOtherInfoToStorage: any; submitNewPassword: any; thirdPartySignInAndUp: any; verifyAndGetStateOrThrowError: any }

Type declaration

  • doesEmailExist:function
    • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
    • +recipe/thirdpartyemailpassword | supertokens-auth-react
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Module recipe/thirdpartyemailpassword

      Index

      References

      Re-exports ActiveDirectory
      Re-exports Apple
      Re-exports Bitbucket
      Re-exports BoxySAML
      Re-exports Discord
      Re-exports Facebook
      Re-exports Github
      Re-exports Gitlab
      Re-exports Google
      Re-exports GoogleWorkspaces
      Re-exports LinkedIn
      Re-exports Okta
      Re-exports Twitter

      Type Aliases

      RecipeInterface: { doesEmailExist: any; emailPasswordSignIn: any; emailPasswordSignUp: any; generateStateToSendToOAuthProvider: any; getAuthErrorFromURL: any; getAuthStateFromURL: any; getAuthorisationURLFromBackend: any; getAuthorisationURLWithQueryParamsAndSetState: any; getResetPasswordTokenFromURL: any; getStateAndOtherInfoFromStorage: any; getTenantIdFromURL: any; sendPasswordResetEmail: any; setStateAndOtherInfoToStorage: any; submitNewPassword: any; thirdPartySignInAndUp: any; verifyAndGetStateOrThrowError: any }

      Type declaration

      • doesEmailExist:function
        • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
        • Check if an email exists

          throws

          STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

          Parameters

          • input: { email: string; options?: RecipeFunctionOptions; userContext: any }
            • email: string
            • Optional options?: RecipeFunctionOptions
            • userContext: any

          Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

          {status: "OK", doesExist: boolean}

          @@ -51,4 +51,4 @@

          Parameters

          • input: { options?: RecipeFunctionOptions; userContext: any }
            • Optional options?: RecipeFunctionOptions
            • userContext: any

          Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; tenantId?: string; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

          {status: OK, user, createdNewRecipeUser: boolean} if succesful

      • verifyAndGetStateOrThrowError:function
        • verifyAndGetStateOrThrowError<CustomStateProperties>(input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }): Promise<StateObject & CustomStateProperties>
        • Verify that the state recieved from the third party provider matches the one in storage

          -

          Type Parameters

          • CustomStateProperties

          Parameters

          • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
            • stateFromAuthProvider: string | undefined
            • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
            • userContext: any

          Returns Promise<StateObject & CustomStateProperties>

      UserInput: { disableEmailPassword?: boolean; oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any }; resetPasswordUsingTokenFeature?: ResetPasswordUsingTokenUserInput; signInAndUpFeature?: SignInAndUpFeatureUserInput } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

      Variables

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

      Functions

      • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
      • Parameters

        • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
          • email: string
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

      • emailPasswordSignIn(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
      • Parameters

        • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
          • formFields: { id: string; value: string }[]
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>

      • emailPasswordSignUp(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
      • Parameters

        • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
          • formFields: { id: string; value: string }[]
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>

      • getAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
      • Parameters

        • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
          • frontendRedirectURI: string
          • Optional options?: RecipeFunctionOptions
          • Optional redirectURIOnProviderDashboard?: string
          • thirdPartyId: string
          • Optional userContext?: UserContext

        Returns Promise<string>

      • getResetPasswordTokenFromURL(input?: { userContext?: UserContext }): string
      • getStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
      • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
      • sendPasswordResetEmail(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
      • Parameters

        • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
          • formFields: { id: string; value: string }[]
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

      • signOut(input?: { userContext?: UserContext }): Promise<void>
      • submitNewPassword(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
      • Parameters

        • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
          • formFields: { id: string; value: string }[]
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

      • thirdPartySignInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      Legend

      • Variable
      • Function
      • Function with type parameter
      • Type alias
      • Class
      • Class with type parameter

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +

      Type Parameters

      • CustomStateProperties

      Parameters

      • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
        • stateFromAuthProvider: string | undefined
        • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
        • userContext: any

      Returns Promise<StateObject & CustomStateProperties>

UserInput: { disableEmailPassword?: boolean; oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any }; resetPasswordUsingTokenFeature?: ResetPasswordUsingTokenUserInput; signInAndUpFeature?: SignInAndUpFeatureUserInput } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • doesEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • emailPasswordSignIn(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; status: "WRONG_CREDENTIALS_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_NOT_ALLOWED" }>

  • emailPasswordSignUp(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_UP_NOT_ALLOWED" }>

  • getAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
  • Parameters

    • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
      • frontendRedirectURI: string
      • Optional options?: RecipeFunctionOptions
      • Optional redirectURIOnProviderDashboard?: string
      • thirdPartyId: string
      • Optional userContext?: UserContext

    Returns Promise<string>

  • getResetPasswordTokenFromURL(input?: { userContext?: UserContext }): string
  • getStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
  • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
  • sendPasswordResetEmail(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" | "PASSWORD_RESET_NOT_ALLOWED" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

  • signOut(input?: { userContext?: UserContext }): Promise<void>
  • submitNewPassword(input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>
  • Parameters

    • input: { formFields: { id: string; value: string }[]; options?: RecipeFunctionOptions; userContext?: UserContext }
      • formFields: { id: string; value: string }[]
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { fetchResponse: Response; status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | { fetchResponse: Response; formFields: { error: string; id: string }[]; status: "FIELD_ERROR" }>

  • thirdPartySignInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_thirdpartypasswordless.html b/docs/modules/recipe_thirdpartypasswordless.html index 99348f7b6..664661f08 100644 --- a/docs/modules/recipe_thirdpartypasswordless.html +++ b/docs/modules/recipe_thirdpartypasswordless.html @@ -1,4 +1,4 @@ -recipe/thirdpartypasswordless | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/thirdpartypasswordless

Index

References

Re-exports ActiveDirectory
Re-exports Apple
Re-exports Bitbucket
Re-exports BoxySAML
Re-exports Discord
Re-exports Facebook
Re-exports Github
Re-exports Gitlab
Re-exports Google
Re-exports GoogleWorkspaces
Re-exports LinkedIn
Re-exports Okta
Re-exports Twitter

Type Aliases

RecipeInterface: { clearPasswordlessLoginAttemptInfo: any; consumePasswordlessCode: any; createPasswordlessCode: any; doesPasswordlessUserEmailExist: any; doesPasswordlessUserPhoneNumberExist: any; generateThirdPartyStateToSendToOAuthProvider: any; getAuthorisationURLFromBackend: any; getPasswordlessLinkCodeFromURL: any; getPasswordlessLoginAttemptInfo: any; getPasswordlessPreAuthSessionIdFromURL: any; getTenantIdFromURL: any; getThirdPartyAuthErrorFromURL: any; getThirdPartyAuthStateFromURL: any; getThirdPartyAuthorisationURLWithQueryParamsAndSetState: any; getThirdPartyStateAndOtherInfoFromStorage: any; resendPasswordlessCode: any; setPasswordlessLoginAttemptInfo: any; setThirdPartyStateAndOtherInfoToStorage: any; thirdPartySignInAndUp: any; verifyAndGetThirdPartyStateOrThrowError: any }

Type declaration

  • clearPasswordlessLoginAttemptInfo:function
    • clearPasswordlessLoginAttemptInfo(input: { userContext: any }): Promise<void>
    • +recipe/thirdpartypasswordless | supertokens-auth-react
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Module recipe/thirdpartypasswordless

      Index

      References

      Re-exports ActiveDirectory
      Re-exports Apple
      Re-exports Bitbucket
      Re-exports BoxySAML
      Re-exports Discord
      Re-exports Facebook
      Re-exports Github
      Re-exports Gitlab
      Re-exports Google
      Re-exports GoogleWorkspaces
      Re-exports LinkedIn
      Re-exports Okta
      Re-exports Twitter

      Type Aliases

      RecipeInterface: { clearPasswordlessLoginAttemptInfo: any; consumePasswordlessCode: any; createPasswordlessCode: any; doesPasswordlessUserEmailExist: any; doesPasswordlessUserPhoneNumberExist: any; generateThirdPartyStateToSendToOAuthProvider: any; getAuthorisationURLFromBackend: any; getPasswordlessLinkCodeFromURL: any; getPasswordlessLoginAttemptInfo: any; getPasswordlessPreAuthSessionIdFromURL: any; getTenantIdFromURL: any; getThirdPartyAuthErrorFromURL: any; getThirdPartyAuthStateFromURL: any; getThirdPartyAuthorisationURLWithQueryParamsAndSetState: any; getThirdPartyStateAndOtherInfoFromStorage: any; resendPasswordlessCode: any; setPasswordlessLoginAttemptInfo: any; setThirdPartyStateAndOtherInfoToStorage: any; thirdPartySignInAndUp: any; verifyAndGetThirdPartyStateOrThrowError: any }

      Type declaration

      • clearPasswordlessLoginAttemptInfo:function
        • clearPasswordlessLoginAttemptInfo(input: { userContext: any }): Promise<void>
        • Clear any information about login attempts from storage

          Parameters

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

          Returns Promise<void>

      • consumePasswordlessCode:function
        • consumePasswordlessCode(input: { deviceId: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any; userInputCode: string } | { linkCode: string; options?: RecipeFunctionOptions; preAuthSessionId: string; tenantId: string | undefined; userContext: any }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
        • Log the user in using the input code or link code

          @@ -62,4 +62,4 @@

          Parameters

          • input: { options?: RecipeFunctionOptions; userContext: any }
            • Optional options?: RecipeFunctionOptions
            • userContext: any

          Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; tenantId?: string; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

          {status: OK, user, createdNewRecipeUser: boolean} if succesful

      • verifyAndGetThirdPartyStateOrThrowError:function
        • verifyAndGetThirdPartyStateOrThrowError<CustomStateProperties>(input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }): Promise<StateObject & CustomStateProperties>
        • Verify that the state recieved from the third party provider matches the one in storage

          -

          Type Parameters

          • CustomStateProperties

          Parameters

          • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
            • stateFromAuthProvider: string | undefined
            • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
            • userContext: any

          Returns Promise<StateObject & CustomStateProperties>

      UserInput: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { disablePasswordless?: boolean; linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; mfaFeature?: PasswordlessFeatureBaseConfig; oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any } } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

      Variables

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

      Functions

      • clearPasswordlessLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
      • consumePasswordlessCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

        Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      • createPasswordlessCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

        Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      • doesPasswordlessUserEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
      • Parameters

        • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
          • email: string
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

      • doesPasswordlessUserPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
      • Parameters

        • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • phoneNumber: string
          • Optional userContext?: UserContext

        Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

      • getPasswordlessLinkCodeFromURL(input?: { userContext?: UserContext }): string
      • getPasswordlessLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
      • Type Parameters

        • CustomLoginAttemptInfoProperties

        Parameters

        • Optional input: { userContext?: UserContext }
          • Optional userContext?: UserContext

        Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

      • getPasswordlessPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
      • getThirdPartyAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
      • Parameters

        • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
          • frontendRedirectURI: string
          • Optional options?: RecipeFunctionOptions
          • Optional redirectURIOnProviderDashboard?: string
          • thirdPartyId: string
          • Optional userContext?: UserContext

        Returns Promise<string>

      • getThirdPartyStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
      • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
      • resendPasswordlessCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

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

      • setPasswordlessLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
      • Type Parameters

        • CustomStateProperties

        Parameters

        • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
          • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
          • Optional userContext?: UserContext

        Returns Promise<void>

      • signOut(input?: { userContext?: UserContext }): Promise<void>
      • thirdPartySignInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
      • Parameters

        • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
          • Optional options?: RecipeFunctionOptions
          • Optional userContext?: UserContext

        Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

      Legend

      • Variable
      • Function
      • Function with type parameter
      • Type alias
      • Class
      • Class with type parameter

      Settings

      Theme

      Generated using TypeDoc

      \ No newline at end of file +

      Type Parameters

      • CustomStateProperties

      Parameters

      • input: { stateFromAuthProvider: string | undefined; stateObjectFromStorage: StateObject & CustomStateProperties | undefined; userContext: any }
        • stateFromAuthProvider: string | undefined
        • stateObjectFromStorage: StateObject & CustomStateProperties | undefined
        • userContext: any

      Returns Promise<StateObject & CustomStateProperties>

UserInput: ({ contactMethod: "EMAIL"; signInUpFeature?: SignInUpFeatureConfigInput; validateEmailAddress?: any } | { contactMethod: "PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string }; validatePhoneNumber?: any } | { contactMethod: "EMAIL_OR_PHONE"; signInUpFeature?: SignInUpFeatureConfigInput & { defaultCountry?: string; guessInternationPhoneNumberFromInputPhoneNumber?: any }; validateEmailAddress?: any; validatePhoneNumber?: any }) & { disablePasswordless?: boolean; linkClickedScreenFeature?: PasswordlessFeatureBaseConfig; mfaFeature?: PasswordlessFeatureBaseConfig; oAuthCallbackScreen?: FeatureBaseConfig; override?: { functions?: any } } & AuthRecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • clearPasswordlessLoginAttemptInfo(input?: { userContext?: UserContext }): Promise<void>
  • consumePasswordlessCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string } | { options?: RecipeFunctionOptions; userContext?: UserContext }

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • createPasswordlessCode(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext } | { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }

    Returns Promise<{ deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

  • doesPasswordlessUserEmailExist(input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { email: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • email: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • doesPasswordlessUserPhoneNumberExist(input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }): Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • phoneNumber: string
      • Optional userContext?: UserContext

    Returns Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK" }>

  • getPasswordlessLinkCodeFromURL(input?: { userContext?: UserContext }): string
  • getPasswordlessLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?: { userContext?: UserContext }): Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>
  • Type Parameters

    • CustomLoginAttemptInfoProperties

    Parameters

    • Optional input: { userContext?: UserContext }
      • Optional userContext?: UserContext

    Returns Promise<undefined | { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomLoginAttemptInfoProperties>

  • getPasswordlessPreAuthSessionIdFromURL(input?: { userContext?: UserContext }): string
  • getThirdPartyAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }): Promise<string>
  • Parameters

    • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; thirdPartyId: string; userContext?: UserContext }
      • frontendRedirectURI: string
      • Optional options?: RecipeFunctionOptions
      • Optional redirectURIOnProviderDashboard?: string
      • thirdPartyId: string
      • Optional userContext?: UserContext

    Returns Promise<string>

  • getThirdPartyStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: UserContext }): undefined | StateObject & CustomStateProperties
  • redirectToThirdPartyLogin(input: { thirdPartyId: string; userContext?: UserContext }): Promise<{ status: "OK" | "ERROR" }>
  • resendPasswordlessCode(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

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

  • setPasswordlessLoginAttemptInfo<CustomStateProperties>(input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }): Promise<void>
  • Type Parameters

    • CustomStateProperties

    Parameters

    • input: { attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties; userContext?: UserContext }
      • attemptInfo: { deviceId: string; flowType: PasswordlessFlowType; preAuthSessionId: string } & CustomStateProperties
      • Optional userContext?: UserContext

    Returns Promise<void>

  • signOut(input?: { userContext?: UserContext }): Promise<void>
  • thirdPartySignInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_totp.html b/docs/modules/recipe_totp.html index 227487f85..14aad0982 100644 --- a/docs/modules/recipe_totp.html +++ b/docs/modules/recipe_totp.html @@ -1 +1 @@ -recipe/totp | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

GetRedirectionURLContext: never
OnHandleEventContext: { action: "TOTP_CODE_VERIFIED"; userContext: UserContext } | { action: "TOTP_DEVICE_VERIFIED"; deviceName: string; userContext: UserContext; wasAlreadyVerified: boolean } | { action: "TOTP_DEVICE_CREATED"; deviceName: string; userContext: UserContext }
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
  • userContext: UserContext
RecipeInterface: { createDevice: any; listDevices: any; removeDevice: any; verifyCode: any; verifyDevice: any }

Type declaration

  • createDevice:function
    • createDevice(input: { deviceName?: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { deviceName?: string; options?: RecipeFunctionOptions; userContext: any }
        • Optional deviceName?: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>

  • listDevices:function
    • listDevices(input: { options?: RecipeFunctionOptions; userContext: any }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
    • Parameters

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>

  • removeDevice:function
    • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
    • Parameters

      • input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>

  • verifyCode:function
    • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext: any }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
    • Parameters

      • input: { options?: RecipeFunctionOptions; totp: string; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

  • verifyDevice:function
    • verifyDevice(input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext: any }): Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
    • Parameters

      • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

UserInput: { override?: { functions?: any }; totpMFAScreen?: Partial<TOTPMFAScreenConfig> } & RecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • createDevice(input?: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • Optional input: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional deviceName?: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>

  • listDevices(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>

  • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>

  • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

  • verifyDevice(input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Parameters

    • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +recipe/totp | supertokens-auth-react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

GetRedirectionURLContext: never
OnHandleEventContext: { action: "TOTP_CODE_VERIFIED"; userContext: UserContext } | { action: "TOTP_DEVICE_VERIFIED"; deviceName: string; userContext: UserContext; wasAlreadyVerified: boolean } | { action: "TOTP_DEVICE_CREATED"; deviceName: string; userContext: UserContext }
PreAPIHookContext: { action: PreAndPostAPIHookAction; requestInit: RequestInit; url: string; userContext: UserContext }

Type declaration

  • action: PreAndPostAPIHookAction
  • requestInit: RequestInit
  • url: string
  • userContext: UserContext
RecipeInterface: { createDevice: any; listDevices: any; removeDevice: any; verifyCode: any; verifyDevice: any }

Type declaration

  • createDevice:function
    • createDevice(input: { deviceName?: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { deviceName?: string; options?: RecipeFunctionOptions; userContext: any }
        • Optional deviceName?: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>

  • listDevices:function
    • listDevices(input: { options?: RecipeFunctionOptions; userContext: any }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
    • Parameters

      • input: { options?: RecipeFunctionOptions; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>

  • removeDevice:function
    • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
    • Parameters

      • input: { deviceName: string; options?: RecipeFunctionOptions; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • userContext: any

      Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>

  • verifyCode:function
    • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext: any }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
    • Parameters

      • input: { options?: RecipeFunctionOptions; totp: string; userContext: any }
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

  • verifyDevice:function
    • verifyDevice(input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext: any }): Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
    • Parameters

      • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext: any }
        • deviceName: string
        • Optional options?: RecipeFunctionOptions
        • totp: string
        • userContext: any

      Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

UserInput: { override?: { functions?: any }; totpMFAScreen?: Partial<TOTPMFAScreenConfig> } & RecipeModuleUserInput<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext>

Variables

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

Functions

  • createDevice(input?: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • Optional input: { deviceName?: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional deviceName?: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ deviceName: string; fetchResponse: Response; qrCodeString: string; secret: string; status: "OK" } | { fetchResponse: Response; status: "DEVICE_ALREADY_EXISTS_ERROR" }>

  • listDevices(input?: { options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>
  • Parameters

    • Optional input: { options?: RecipeFunctionOptions; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ devices: { name: string; period: number; skew: number; verified: boolean }[]; fetchResponse: Response; status: "OK" }>

  • removeDevice(input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }): Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>
  • Parameters

    • input: { deviceName: string; options?: RecipeFunctionOptions; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • Optional userContext?: UserContext

    Returns Promise<{ didDeviceExist: boolean; fetchResponse: Response; status: "OK" }>

  • verifyCode(input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Parameters

    • input: { options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK" } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

  • verifyDevice(input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }): Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>
  • Parameters

    • input: { deviceName: string; options?: RecipeFunctionOptions; totp: string; userContext?: UserContext }
      • deviceName: string
      • Optional options?: RecipeFunctionOptions
      • totp: string
      • Optional userContext?: UserContext

    Returns Promise<{ fetchResponse: Response; status: "OK"; wasAlreadyVerified: boolean } | { currentNumberOfFailedAttempts: number; fetchResponse: Response; maxNumberOfFailedAttempts: number; status: "INVALID_TOTP_ERROR" } | { fetchResponse: Response; status: "UNKNOWN_DEVICE_ERROR" } | { fetchResponse: Response; retryAfterMs: number; status: "LIMIT_REACHED_ERROR" }>

Generated using TypeDoc

\ No newline at end of file