From 1e243b89dfb075b44b6445f9d560cdba8feb7293 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Mon, 24 Jun 2024 17:20:30 +0200 Subject: [PATCH] adding dev-v0.42.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_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_totp.html | 2 +- 37 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/classes/index.default.html b/docs/classes/index.default.html index ba3581c28..44d33018e 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 dcd888f31..e689eb3ae 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>
  • getFirstFactorsForAuthPage(): 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>
  • getFirstFactorsForAuthPage(): 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 e2a3c5873..4b47e1774 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 1947459e2..d004aa9d1 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 ba838b11c..9d89f47e9 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: "emailpassword"; LINK_EMAIL: "link-email"; LINK_PHONE: "link-phone"; OTP_EMAIL: "otp-email"; OTP_PHONE: "otp-phone"; THIRDPARTY: "thirdparty"; TOTP: "totp" } = FactorIds

Type declaration

  • EMAILPASSWORD: "emailpassword"
  • LINK_EMAIL: "link-email"
  • LINK_PHONE: "link-phone"
  • OTP_EMAIL: "otp-email"
  • OTP_PHONE: "otp-phone"
  • THIRDPARTY: "thirdparty"
  • TOTP: "totp"
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: "emailpassword"; LINK_EMAIL: "link-email"; LINK_PHONE: "link-phone"; OTP_EMAIL: "otp-email"; OTP_PHONE: "otp-phone"; THIRDPARTY: "thirdparty"; TOTP: "totp" } = FactorIds

Type declaration

  • EMAILPASSWORD: "emailpassword"
  • LINK_EMAIL: "link-email"
  • LINK_PHONE: "link-phone"
  • OTP_EMAIL: "otp-email"
  • OTP_PHONE: "otp-phone"
  • THIRDPARTY: "thirdparty"
  • TOTP: "totp"
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 80970e51f..49c7b4f01 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 c555ef9d4..ff9f1fde4 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 a40721ab0..62fb4b19b 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 14a6fbd08..ef1e59a23 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 3331da5b0..40878cb35 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; 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; 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; defaultToEmail?: boolean }; 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; defaultToEmail?: boolean }; 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 86e69646c..59b1e2882 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; 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; 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 200e759a1..a49f285df 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; 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; 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

      • init(config?: UserInput): RecipeInitResult<never, PreAndPostAPIHookAction, { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; user: User; userContext: UserContext }, NormalisedConfig>
      • Parameters

        Returns RecipeInitResult<never, PreAndPostAPIHookAction, { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; user: User; userContext: UserContext }, NormalisedConfig>

      • 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

  • init(config?: UserInput): RecipeInitResult<never, PreAndPostAPIHookAction, { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; user: User; userContext: UserContext }, NormalisedConfig>
  • Parameters

    Returns RecipeInitResult<never, PreAndPostAPIHookAction, { action: "SUCCESS"; createdNewSession: boolean; isNewRecipeUser: boolean; user: User; userContext: UserContext }, NormalisedConfig>

  • 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_totp.html b/docs/modules/recipe_totp.html index 5fbb5440d..fb66dd68e 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