Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

SuperTokensConfig: { appInfo: AppInfoUserInput; clientType?: string; cookieHandler?: CookieHandlerInput; dateProvider?: DateProviderInput; defaultToSignUp?: boolean; disableAuthRoute?: boolean; enableDebugLogs?: boolean; experimental?: { plugins?: SuperTokensPlugin[] }; languageTranslations?: { currentLanguageCookieScope?: string; defaultLanguage?: string; translationFunc?: TranslationFunc; translations?: TranslationStore }; privacyPolicyLink?: string; recipeList: { authReact: CreateRecipeFunction<any, any, any, any>; recipeID: string; webJS: CreateRecipeFunctionWebJS<any> }[]; style?: string; termsOfServiceLink?: string; useShadowDom?: boolean; usesDynamicLoginMethods?: boolean; windowHandler?: WindowHandlerInput; getRedirectionURL?: any }

Type declaration

  • appInfo: AppInfoUserInput
  • Optional clientType?: string

    Identifier for the client, such as web, ios, etc. to be used with thirdparty, multitenancy recipes.

  • Optional cookieHandler?: CookieHandlerInput
  • Optional dateProvider?: DateProviderInput
  • Optional defaultToSignUp?: boolean
  • Optional disableAuthRoute?: boolean
  • Optional enableDebugLogs?: boolean
  • Optional experimental?: { plugins?: SuperTokensPlugin[] }

    Our experimental features are not yet stable and are subject to change. In practical terms, this means that their interface is subject to change without a major version update. They are also not tested as much as our "normal" features.

    If you want to use these features, or if you have any feedback please let us know at: https://supertokens.com/discord

  • Optional languageTranslations?: { currentLanguageCookieScope?: string; defaultLanguage?: string; translationFunc?: TranslationFunc; translations?: TranslationStore }
    • Optional currentLanguageCookieScope?: string
    • Optional defaultLanguage?: string
    • Optional translationFunc?: TranslationFunc
    • Optional translations?: TranslationStore
  • Optional privacyPolicyLink?: string
  • recipeList: { authReact: CreateRecipeFunction<any, any, any, any>; recipeID: string; webJS: CreateRecipeFunctionWebJS<any> }[]
  • Optional style?: string
  • Optional termsOfServiceLink?: string
  • Optional useShadowDom?: boolean
  • Optional usesDynamicLoginMethods?: boolean
  • Optional windowHandler?: WindowHandlerInput
  • getRedirectionURL?:function
    • getRedirectionURL(context: NormalisedGetRedirectionURLContext<GetRedirectionURLContext>, userContext: UserContext): Promise<undefined | null | string>
    • Parameters

      • context: NormalisedGetRedirectionURLContext<GetRedirectionURLContext>
      • userContext: UserContext

      Returns Promise<undefined | null | string>

SuperTokensPlugin: { compatibleAuthReactSDKVersions?: string | string[]; compatibleWebJSSDKVersions?: string | string[]; exports?: Record<string, any>; generalAuthRecipeComponentOverrides?: AuthRecipeComponentOverrideMap; id: string; overrideMap?: { [ recipeId in keyof AllRecipeConfigs]?: RecipePluginOverride<recipeId> & { recipeInitRequired?: boolean | ((sdkVersion: string) => boolean) } }; routeHandlers?: ((config: SuperTokensPublicConfig, allPlugins: SuperTokensPublicPlugin[], sdkVersion: string) => { routeHandlers: PluginRouteHandler[]; status: "OK" } | { message: string; status: "ERROR" }) | PluginRouteHandler[]; version?: string; config?: any; dependencies?: any; init?: any }

Type declaration

SuperTokensPublicConfig: Omit<Omit<SuperTokensConfig, NonPublicConfigPropertiesType>, "appInfo"> & { appInfo: NormalisedAppInfo }
SuperTokensPublicPlugin: Pick<SuperTokensPlugin, "id" | "version" | "exports" | "compatibleAuthReactSDKVersions" | "compatibleWebJSSDKVersions"> & { initialized: boolean }
TranslationStore: Record<string, Record<string, string | undefined>>

Variables

SuperTokensWrapper: React.FC<PropsWithChildren<{ userContext?: UserContext }>> = ...

Functions

  • changeLanguage(language: string): Promise<void>
  • getTranslationFunction<T>(...stores: TranslationStore[]): ((key: T, replacements?: Record<string, string>) => string)
  • Type Parameters

    • T extends string

    Parameters

    Returns ((key: T, replacements?: Record<string, string>) => string)

      • (key: T, replacements?: Record<string, string>): string
      • Parameters

        • key: T
        • Optional replacements: Record<string, string>

        Returns string

  • isRecipeInitialized(recipeId: string): boolean
  • 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>

  • useTranslation(): TranslationFunc
  • useUserContext(): UserContext

Generated using TypeDoc