Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-web-js/recipe/thirdparty/types

References documentation for the supertokens-web-js/recipe/thirdparty/types package

Type Aliases

InputType

type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts


NormalisedInputType

type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

Type Declaration

Name Type Defined in
override object tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
override.functions() (originalImplementation, builder) => RecipeInterface tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

PostAPIHookContext

type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts


PreAndPostAPIHookAction

type PreAndPostAPIHookAction = "GET_AUTHORISATION_URL" | "THIRD_PARTY_SIGN_IN_UP";

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts


PreAPIHookContext

type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts


RecipeInterface

type RecipeInterface = object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

Properties

Property Type Description Defined in
generateStateToSendToOAuthProvider (input?) => string Generate a new state that will be sent to the third party provider tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
getAuthErrorFromURL (input) => string | undefined Returns the error from the current URL tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
getAuthorisationURLFromBackend (input) => Promise<{ fetchResponse: Response; pkceCodeVerifier?: string; status: "OK"; urlWithQueryParams: string; }> Get the URL to be used by the third party provider for redirecting after the auth flow. Also returns PKCE Code Verifier if using PKCE. Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
getAuthorisationURLWithQueryParamsAndSetState (input) => Promise<string> Get the URL that should be opened for third party authentication Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
getAuthStateFromURL (input) => string Returns the auth state from the current URL tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
getStateAndOtherInfoFromStorage <CustomStateProperties>(input) => StateObject & CustomStateProperties | undefined Get the current login state from storage, this is also used when calling signInUp tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
setStateAndOtherInfoToStorage <CustomStateProperties>(input) => Promise<void> Set the login state to storage tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
signInAndUp (input) => 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"; }> Sign up/Sign in the user, this method uses the login attempt information from storage Throws STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR" tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
verifyAndGetStateOrThrowError <CustomStateProperties>(input) => Promise<StateObject & CustomStateProperties> Verify that the state received from the third party provider matches the one in storage tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

StateObject

type StateObject = object;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

Properties


UserInput

type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;

Defined in: tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

Type Declaration

Name Type Description Defined in
override? object Refer to the documentation tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts
override.functions()? (originalImplementation, builder) => RecipeInterface - tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts

API reference

API schema and response details