These are the SDK reference docs. If you’re looking for docs to implement SuperTokens, you might want to check out the User Guides

Index

References

EmailVerificationTheme

Renames and re-exports __type

ThirdPartyAuth

Renames and re-exports __type

Type aliases

GetRedirectionURLContext

GetRedirectionURLContext: AuthRecipeModuleGetRedirectionURLContext

OnHandleEventContext

OnHandleEventContext: AuthRecipeModuleOnHandleEventContext | { action: "SUCCESS"; isNewUser: boolean; user: { email: string; id: string } }

PreAPIHookContext

PreAPIHookContext: AuthRecipeModulePreAPIHookContext | { action: "GET_AUTHORISATION_URL"; requestInit: RequestInit; url: string } | { action: "THIRD_PARTY_SIGN_IN_UP"; requestInit: RequestInit; url: string }

RecipeInterface

RecipeInterface: { getOAuthAuthorisationURL: any; getOAuthState: any; redirectToThirdPartyLogin: any; setOAuthState: any; signInAndUp: any }

Type declaration

  • getOAuthAuthorisationURL:function
    • getOAuthAuthorisationURL(input: { config: NormalisedConfig; thirdPartyId: string }): Promise<string>
  • getOAuthState:function
    • getOAuthState(): undefined | StateObject
  • redirectToThirdPartyLogin:function
    • redirectToThirdPartyLogin(input: { config: NormalisedConfig; state?: StateObject; thirdPartyId: string }): Promise<{ status: "OK" | "ERROR" }>
    • Parameters

      • input: { config: NormalisedConfig; state?: StateObject; thirdPartyId: string }
        • config: NormalisedConfig
        • Optional state?: StateObject
        • thirdPartyId: string

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

  • setOAuthState:function
    • setOAuthState(state: StateObject): void
  • signInAndUp:function
    • signInAndUp(input: { config: NormalisedConfig; thirdPartyId: string }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>
    • Parameters

      • input: { config: NormalisedConfig; thirdPartyId: string }
        • config: NormalisedConfig
        • thirdPartyId: string

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>

UserInput

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

Variables

SignInAndUpTheme

SignInAndUpTheme: React.FC<SignInAndUpThemeProps> = ...

Functions

Const EmailVerification

  • EmailVerification(prop?: any): Element

Const SignInAndUp

  • SignInAndUp(prop?: any): Element

Const init

Const isEmailVerified

  • isEmailVerified(): Promise<boolean>

Const redirectToAuth

  • redirectToAuth(input?: "signin" | "signup" | { redirectBack?: false | true; show?: "signin" | "signup" }): Promise<void>

Const signOut

  • signOut(): Promise<void>

Generated using TypeDoc