Skip to main content
References

ThirdParty Types

Type Aliases

InputType

type InputType = AuthRecipeInputType<PreAndPostAPIHookAction> & UserInput;

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

NormalisedInputType

type NormalisedInputType = AuthRecipeNormalisedInputType<PreAndPostAPIHookAction> & object;

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

Type Declaration

NameTypeDefined in
overrideobjecttmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:48
override.functions()(originalImplementation, builder) => RecipeInterfacetmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:49

PostAPIHookContext

type PostAPIHookContext = RecipePostAPIHookContext<PreAndPostAPIHookAction>;

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

PreAndPostAPIHookAction

type PreAndPostAPIHookAction = "GET_AUTHORISATION_URL" | "THIRD_PARTY_SIGN_IN_UP";

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

PreAPIHookContext

type PreAPIHookContext = RecipePreAPIHookContext<PreAndPostAPIHookAction>;

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

RecipeInterface

type RecipeInterface = object;

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

Properties

PropertyTypeDescriptionDefined in
generateStateToSendToOAuthProvider(input?) => stringGenerate a new state that will be sent to the third party providertmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:193
getAuthErrorFromURL(input) => string | undefinedReturns the error from the current URLtmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:217
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:138
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:111
getAuthStateFromURL(input) => stringReturns the auth state from the current URLtmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:226
getStateAndOtherInfoFromStorage<CustomStateProperties>(input) => StateObject & CustomStateProperties | undefinedGet the current login state from storage, this is also used when calling signInUptmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:74
setStateAndOtherInfoToStorage<CustomStateProperties>(input) => Promise<void>Set the login state to storagetmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:85
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:165
verifyAndGetStateOrThrowError<CustomStateProperties>(input) => Promise<StateObject & CustomStateProperties>Verify that the state recieved from the third party provider matches the one in storagetmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:204

StateObject

type StateObject = object;

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

Properties

UserInput

type UserInput = object & RecipeModuleUserInput<PreAndPostAPIHookAction>;

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

Type Declaration

NameTypeDescriptionDefined in
override?objectRefer to the documentationtmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:37
override.functions()?(originalImplementation, builder) => RecipeInterface-tmp/supertokens-web-js/lib/ts/recipe/thirdparty/types.ts:38