supertokens-auth-react/recipe/oauth2provider
References documentation for the supertokens-auth-react/recipe/oauth2provider package
Classes
default
Defined in: recipe/oauth2provider/index.ts
Constructors
Constructor
new default(): default;
Returns
Properties
| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
ComponentsOverrideProvider |
static |
any |
RecipeComponentsOverrideContextProvider |
recipe/oauth2provider/index.ts |
Methods
getLoginChallengeInfo()
static getLoginChallengeInfo(input): Promise<{
fetchResponse: Response;
info: LoginInfo;
status: "OK";
}>;
Defined in: recipe/oauth2provider/index.ts
Returns information about an OAuth login in progress
Parameters
| Parameter | Type |
|---|---|
input |
{ loginChallenge: string; options?: RecipeFunctionOptions; userContext?: any; } |
input.loginChallenge |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
any |
Returns
Promise<{
fetchResponse: Response;
info: LoginInfo;
status: "OK";
}>
{status: "OK", info: LoginInfo}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
getRedirectURLToContinueOAuthFlow()
static getRedirectURLToContinueOAuthFlow(input): Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}>;
Defined in: recipe/oauth2provider/index.ts
Accepts the OAuth2 Login request and returns the redirect URL to continue the OAuth flow.
Parameters
| Parameter | Type |
|---|---|
input |
{ loginChallenge: string; options?: RecipeFunctionOptions; userContext?: any; } |
input.loginChallenge |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
any |
Returns
Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}>
{status: "OK", frontendRedirectTo: string}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
init()
static init(config?): RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig>;
Defined in: recipe/oauth2provider/index.ts
Parameters
| Parameter | Type |
|---|---|
config? |
UserInput |
Returns
RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig>
logOut()
static logOut(input): Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}>;
Defined in: recipe/oauth2provider/index.ts
Accepts the OAuth2 Logout request, clears the SuperTokens session and returns post logout redirect URL.
Parameters
| Parameter | Type |
|---|---|
input |
{ logoutChallenge: string; options?: RecipeFunctionOptions; userContext?: any; } |
input.logoutChallenge |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
any |
Returns
Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}>
{status: "OK", frontendRedirectTo: string}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
Variables
getLoginChallengeInfo()
const getLoginChallengeInfo: (input) => Promise<{
fetchResponse: Response;
info: LoginInfo;
status: "OK";
}> = Wrapper.getLoginChallengeInfo;
Defined in: recipe/oauth2provider/index.ts
Returns information about an OAuth login in progress
Parameters
| Parameter | Type |
|---|---|
input |
{ loginChallenge: string; options?: RecipeFunctionOptions; userContext?: any; } |
input.loginChallenge |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
any |
Returns
Promise<{
fetchResponse: Response;
info: LoginInfo;
status: "OK";
}>
{status: "OK", info: LoginInfo}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
init()
const init: (config?) => RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig> = Wrapper.init;
Defined in: recipe/oauth2provider/index.ts
Parameters
| Parameter | Type |
|---|---|
config? |
UserInput |
Returns
RecipeInitResult<GetRedirectionURLContext, PreAndPostAPIHookAction, OnHandleEventContext, NormalisedConfig>
logOut()
const logOut: (input) => Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}> = Wrapper.logOut;
Defined in: recipe/oauth2provider/index.ts
Accepts the OAuth2 Logout request, clears the SuperTokens session and returns post logout redirect URL.
Parameters
| Parameter | Type |
|---|---|
input |
{ logoutChallenge: string; options?: RecipeFunctionOptions; userContext?: any; } |
input.logoutChallenge |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
any |
Returns
Promise<{
fetchResponse: Response;
frontendRedirectTo: string;
status: "OK";
}>
{status: "OK", frontendRedirectTo: string}
Throws
STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"
References
GetRedirectionURLContext
Re-exports GetRedirectionURLContext
OnHandleEventContext
Re-exports OnHandleEventContext
PreAPIHookContext
Re-exports PreAPIHookContext
RecipeComponentsOverrideContextProvider
Renames and re-exports SuperTokensWrapper
RecipeInterface
Renames and re-exports SuperTokensWrapper
UserInput
Re-exports UserInput