Skip to main content
References

SuperTokens React Types

Type Aliases

AllRecipeComponentOverrides

type AllRecipeComponentOverrides = object;

Defined in: types.ts:509

Properties

AllRecipeConfigs

type AllRecipeConfigs = object;

Defined in: types.ts:496

Properties

PropertyTypeDefined in
emailpasswordConfigtypes.ts:497
emailverificationConfigtypes.ts:498
multifactorauthConfigtypes.ts:499
multitenancyUserInputtypes.ts:500
oauth2providerUserInputtypes.ts:501
passwordlessConfigtypes.ts:502
sessionInputTypetypes.ts:503
thirdpartyConfigtypes.ts:504
totpConfigtypes.ts:505
webauthnConfigtypes.ts:506

APIFormField

type APIFormField = object;

Defined in: types.ts:340

Properties

PropertyTypeDefined in
idstringtypes.ts:344
valuestringtypes.ts:349

AppInfoUserInput

type AppInfoUserInput = object;

Defined in: types.ts:202

Properties

PropertyTypeDescriptionDefined in
apiBasePath?string-types.ts:222
apiDomainstring-types.ts:211
apiGatewayPath?stringAn API gateway may be used which prepends a path to the API route. That path should be specified here.types.ts:234
appNamestring-types.ts:206
websiteBasePath?string-types.ts:228
websiteDomainstring-types.ts:216

AuthComponent<T>

type AuthComponent<T> = 
| PartialAuthComponent
| FullPageAuthComponent<T>;

Defined in: types.ts:491

Type Parameters

Type ParameterDefault type
Tany

AuthComponentProps

type AuthComponentProps = object;

Defined in: types.ts:457

Properties

PropertyTypeDefined in
children?React.ReactNodetypes.ts:469
clearError() => voidtypes.ts:467
errorstring | undefinedtypes.ts:465
navigateNavigate | undefinedtypes.ts:463
onAuthSuccess(successContext) => Promise<void>types.ts:462
onError(err) => voidtypes.ts:466
onSignInUpSwitcherClick() => voidtypes.ts:460
rebuildAuthPage() => voidtypes.ts:461
resetFactorList() => voidtypes.ts:459
setFactorList(factorIds) => voidtypes.ts:458
showBackButtonbooleantypes.ts:468
userContextUserContexttypes.ts:464

Awaited<T>

type Awaited<T> = T extends null | undefined ? T : T extends object & object ? F extends (value, ...args) => any ? V : never : T;

Defined in: types.ts:432

Type Parameters

Type Parameter
T

BaseFeatureComponentMap

type BaseFeatureComponentMap = Record<string, ComponentWithRecipeAndMatchingMethod[]>;

Defined in: types.ts:299

ComponentWithRecipeAndMatchingMethod

type ComponentWithRecipeAndMatchingMethod = object;

Defined in: types.ts:280

Properties

PropertyTypeDescriptionDefined in
componentReactComponentClass-types.ts:284
matches() => boolean-types.ts:289
recipeIDstringRecipe ID this component belongstypes.ts:294

CreateRecipeFunction()<T, S, R, N>

type CreateRecipeFunction<T, S, R, N> = (appInfo, enableDebugLogs) => BaseRecipeModule<T, S, R, N>;

Defined in: types.ts:197

Type Parameters

Type Parameter
T
S
R
N extends NormalisedRecipeModuleConfig<T, S, R>

Parameters

ParameterType
appInfoNormalisedAppInfo
enableDebugLogsboolean

Returns

BaseRecipeModule<T, S, R, N>

FeatureBaseConfig

type FeatureBaseConfig = object;

Defined in: types.ts:407

Properties

PropertyTypeDefined in
style?stringtypes.ts:411

FeatureBaseProps<T>

type FeatureBaseProps<T> = PropsWithChildren<object & T>;

Defined in: types.ts:425

Type Parameters

Type ParameterDefault type
TRecord<string, unknown>

FormField

type FormField = FormFieldBaseConfig & object;

Defined in: types.ts:328

Type Declaration

NameTypeDefined in
optional?booleantypes.ts:337
validate()?(value) => Promise<string | undefined>types.ts:332

FormFieldBaseConfig

type FormFieldBaseConfig = object;

Defined in: types.ts:301

Properties

PropertyTypeDefined in
getDefaultValue?() => stringtypes.ts:320
idstringtypes.ts:305
labelstringtypes.ts:310
nonOptionalErrorMsg?stringtypes.ts:325
placeholder?stringtypes.ts:315

FullPageAuthComponent<PreloadInfoType>

type FullPageAuthComponent<PreloadInfoType> = object;

Defined in: types.ts:474

Type Parameters

Type ParameterDefault type
PreloadInfoTypeany

Properties

PropertyTypeDefined in
componentReact.FC<FullPageAuthComponentProps<PreloadInfoType>>types.ts:481
preloadInfoAndRunChecks(firstFactors, userContext, isSignUp) => Promise< | { preloadInfo: PreloadInfoType; shouldDisplay: true; } | { shouldDisplay: false; }>types.ts:476
type"FULL_PAGE"types.ts:475

FullPageAuthComponentProps<PreloadInfoType>

type FullPageAuthComponentProps<PreloadInfoType> = AuthComponentProps & object;

Defined in: types.ts:472

Type Declaration

NameTypeDefined in
preloadInfoPreloadInfoTypetypes.ts:472

Type Parameters

Type Parameter
PreloadInfoType

GetRedirectionURLContext

type GetRedirectionURLContext = NormalisedGetRedirectionURLContext<
| {
action: "TO_AUTH";
showSignIn?: boolean;
}
| SuccessRedirectContextInApp>;

Defined in: types.ts:72

type Navigate = 
| {
goBack: () => void;
push: (path) => void;
}
| NavigateFunction;

Defined in: types.ts:448

NonPublicConfigPropertiesType

type NonPublicConfigPropertiesType = typeof nonPublicConfigProperties[number];

Defined in: types.ts:566

NormalisedAppInfo

type NormalisedAppInfo = object;

Defined in: types.ts:248

Properties

PropertyTypeDefined in
apiBasePathSuperTokensWrappertypes.ts:268
apiDomainSuperTokensWrappertypes.ts:257
appNamestringtypes.ts:252
websiteBasePathSuperTokensWrappertypes.ts:274
websiteDomainSuperTokensWrappertypes.ts:262

NormalisedBaseConfig

type NormalisedBaseConfig = object;

Defined in: types.ts:414

Properties

PropertyTypeDefined in
stylestringtypes.ts:418

NormalisedConfigWithAppInfoAndRecipeID<NormalisedConfig>

type NormalisedConfigWithAppInfoAndRecipeID<NormalisedConfig> = NormalisedConfig & object;

Defined in: types.ts:243

Type Declaration

NameTypeDefined in
appInfoNormalisedAppInfotypes.ts:244
recipeIdstringtypes.ts:245

Type Parameters

Type Parameter
NormalisedConfig

NormalisedFormField

type NormalisedFormField = object;

Defined in: types.ts:352

Properties

PropertyTypeDefined in
autoComplete?stringtypes.ts:386
autofocus?booleantypes.ts:391
getDefaultValue?() => stringtypes.ts:396
hidden?booleantypes.ts:398
idstringtypes.ts:356
labelstringtypes.ts:361
nonOptionalErrorMsg?stringtypes.ts:381
optionalbooleantypes.ts:376
placeholderstringtypes.ts:366
validate(value) => Promise<string | undefined> | string | undefinedtypes.ts:371

NormalisedGetRedirectionURLContext<RecipeContext>

type NormalisedGetRedirectionURLContext<RecipeContext> = RecipeContext & object;

Defined in: types.ts:492

Type Declaration

NameTypeDefined in
tenantIdFromQueryParamsstring | undefinedtypes.ts:493

Type Parameters

Type Parameter
RecipeContext

PartialAuthComponent

type PartialAuthComponent = object;

Defined in: types.ts:484

Properties

PropertyTypeDefined in
componentReact.FC<PartialAuthComponentProps>types.ts:488
displayOrdernumbertypes.ts:487
factorIdsstring[]types.ts:486
type"SIGN_IN_UP" | "SIGN_IN" | "SIGN_UP"types.ts:485

PartialAuthComponentProps

type PartialAuthComponentProps = AuthComponentProps;

Defined in: types.ts:471

PluginRouteHandler

type PluginRouteHandler = object;

Defined in: types.ts:529

Properties

PropertyTypeDefined in
handler() => JSX.Elementtypes.ts:531
pathstringtypes.ts:530

ReactComponentClass<P>

type ReactComponentClass<P> = ComponentClass<P, any> | (props) => JSX.Element;

Defined in: types.ts:401

Type Parameters

Type ParameterDefault type
Pany

RecipeFeatureComponentMap

type RecipeFeatureComponentMap = Record<string, ComponentWithRecipeAndMatchingMethod>;

Defined in: types.ts:297

RecipeInitResult<T, Action, R, P>

type RecipeInitResult<T, Action, R, P> = object;

Defined in: types.ts:237

Type Parameters

Type Parameter
T
Action
R
P extends NormalisedRecipeModuleConfig<T, Action, R>

Properties

PropertyTypeDefined in
authReactCreateRecipeFunction<T, Action, R, P>types.ts:239
recipeIDstringtypes.ts:238
webJSSuperTokensWrapper<Action>types.ts:240

RecipePluginOverride<T>

type RecipePluginOverride<T> = object;

Defined in: types.ts:523

Type Parameters

Type Parameter
T extends keyof AllRecipeConfigs

Properties

PropertyTypeDefined in
components?AllRecipeComponentOverrides[T]types.ts:525
config?(config) => AllRecipeConfigs[T]types.ts:526
functions?NonNullable<AllRecipeConfigs[T]["override"]>["functions"]types.ts:524

SessionClaimValidator

type SessionClaimValidator = SuperTokensWrapper & object;

Defined in: types.ts:90

Type Declaration

NameTypeDefined in
onFailureRedirection?ValidationFailureCallbacktypes.ts:92
showAccessDeniedOnFailure?booleantypes.ts:91

SuccessRedirectContext

type SuccessRedirectContext = 
| SuccessRedirectContextInApp
| SuccessRedirectContextOAuth2;

Defined in: types.ts:70

SuccessRedirectContextInApp

type SuccessRedirectContextInApp = SuccessRedirectContextCommon & object;

Defined in: types.ts:64

Type Declaration

NameTypeDefined in
action"SUCCESS"types.ts:64
redirectToPath?stringtypes.ts:64

SuccessRedirectContextOAuth2

type SuccessRedirectContextOAuth2 = SuccessRedirectContextCommon & object;

Defined in: types.ts:65

Type Declaration

NameTypeDefined in
action"SUCCESS_OAUTH2"types.ts:66
frontendRedirectTostringtypes.ts:67

SuperTokensConfig

type SuperTokensConfig = object;

Defined in: types.ts:99

Properties

PropertyTypeDescriptionDefined in
appInfoAppInfoUserInput-types.ts:103
clientType?stringIdentifier for the client, such as web, ios, etc. to be used with thirdparty, multitenancy recipes.types.ts:108
cookieHandler?SuperTokensWrapper-types.ts:119
dateProvider?SuperTokensWrapper-types.ts:123
defaultToSignUp?boolean-types.ts:169
disableAuthRoute?boolean-types.ts:164
enableDebugLogs?boolean-types.ts:156
experimental?objectOur 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/discordtypes.ts:190
experimental.plugins?SuperTokensPlugin[]-types.ts:191
getRedirectionURL?(context, userContext) => Promise<string | undefined | null>-types.ts:157
languageTranslations?object-types.ts:127
languageTranslations.currentLanguageCookieScope?string-types.ts:137
languageTranslations.defaultLanguage?string-types.ts:131
languageTranslations.translationFunc?TranslationFunc-types.ts:154
languageTranslations.translations?TranslationStore-types.ts:149
privacyPolicyLink?string-types.ts:174
recipeListobject[]-types.ts:113
style?string-types.ts:162
termsOfServiceLink?string-types.ts:179
usesDynamicLoginMethods?boolean-types.ts:125
useShadowDom?boolean-types.ts:163
windowHandler?SuperTokensWrapper-types.ts:121

SuperTokensConfigWithNormalisedAppInfo

type SuperTokensConfigWithNormalisedAppInfo = Omit<SuperTokensConfig, "appInfo"> & object;

Defined in: types.ts:568

Type Declaration

NameTypeDefined in
appInfoNormalisedAppInfotypes.ts:569

SuperTokensPlugin

type SuperTokensPlugin = object;

Defined in: types.ts:535

Properties

PropertyTypeDefined in
compatibleAuthReactSDKVersions?string | string[]types.ts:538
compatibleWebJSSDKVersions?string | string[]types.ts:539
config?(config) => | Omit<SuperTokensPublicConfig, "appInfo"> | undefinedtypes.ts:560
dependencies?(config, pluginsAbove, sdkVersion) => | { pluginsToAdd?: SuperTokensPlugin[]; status: "OK"; } | { message: string; status: "ERROR"; }types.ts:541
exports?Record<string, any>types.ts:561
generalAuthRecipeComponentOverrides?AuthRecipeComponentOverrideMaptypes.ts:551
idstringtypes.ts:536
init?(config, allPlugins, sdkVersion) => voidtypes.ts:540
overrideMap?{ [recipeId in keyof AllRecipeConfigs]?: RecipePluginOverride<recipeId> & { recipeInitRequired?: boolean | ((sdkVersion: string) => boolean) } }types.ts:546
routeHandlers?| (config, allPlugins, sdkVersion) => | { routeHandlers: PluginRouteHandler[]; status: "OK"; } | { message: string; status: "ERROR"; } | PluginRouteHandler[]types.ts:552
version?stringtypes.ts:537

SuperTokensPublicConfig

type SuperTokensPublicConfig = Omit<Omit<SuperTokensConfig, NonPublicConfigPropertiesType>, "appInfo"> & object;

Defined in: types.ts:576

Type Declaration

NameTypeDefined in
appInfoNormalisedAppInfotypes.ts:577

SuperTokensPublicPlugin

type SuperTokensPublicPlugin = Pick<SuperTokensPlugin, 
| "id"
| "version"
| "exports"
| "compatibleAuthReactSDKVersions"
| "compatibleWebJSSDKVersions"> & object;

Defined in: types.ts:571

Type Declaration

NameTypeDefined in
initializedbooleantypes.ts:574

ThemeBaseProps

type ThemeBaseProps = object;

Defined in: types.ts:421

Properties

PropertyTypeDefined in
styleFromInit?stringtypes.ts:422

UserContext

type UserContext = Record<string, any>;

Defined in: types.ts:455

ValidationFailureCallback

type ValidationFailureCallback = 
| ({
userContext,
reason,
}) => Promise<string | undefined> | string | undefined
| undefined;

Defined in: types.ts:80

WebJSRecipeInterface<T>

type WebJSRecipeInterface<T> = Omit<T, "default" | "init" | "signOut">;

Defined in: types.ts:195

Type Parameters

Type Parameter
T

Variables

nonPublicConfigProperties

const nonPublicConfigProperties: readonly ["experimental"];

Defined in: types.ts:564