supertokens-auth-react/recipe/emailpassword
References documentation for the supertokens-auth-react/recipe/emailpassword package
Classes
default
Defined in: recipe/emailpassword/index.ts
Constructors
Constructor
new default(): default;
Returns
Properties
| Property | Modifier | Type | Default value | Defined in |
|---|---|---|---|---|
ComponentsOverrideProvider |
static |
any |
RecipeComponentsOverrideContextProvider |
recipe/emailpassword/index.ts |
Methods
doesEmailExist()
static doesEmailExist(input): Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ email: string; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.email |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>
getResetPasswordTokenFromURL()
static getResetPasswordTokenFromURL(input?): string;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input? |
{ userContext?: UserContext; } |
input.userContext? |
UserContext |
Returns
string
init()
static init(config?): any;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
config? |
UserInput |
Returns
any
sendPasswordResetEmail()
static sendPasswordResetEmail(input): Promise<
| {
fetchResponse: Response;
status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>
signIn()
static signIn(input): Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
status: "WRONG_CREDENTIALS_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_NOT_ALLOWED";
}>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.shouldTryLinkingWithSessionUser? |
boolean |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
status: "WRONG_CREDENTIALS_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_NOT_ALLOWED";
}>
signOut()
static signOut(input?): Promise<void>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input? |
{ userContext?: UserContext; } |
input.userContext? |
UserContext |
Returns
Promise<void>
signUp()
static signUp(input): Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_UP_NOT_ALLOWED";
}>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.shouldTryLinkingWithSessionUser? |
boolean |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_UP_NOT_ALLOWED";
}>
submitNewPassword()
static submitNewPassword(input): Promise<
| {
fetchResponse: Response;
status: "OK";
}
| {
fetchResponse: Response;
status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
}
| {
fetchResponse: Response;
status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>
Variables
doesEmailExist()
const doesEmailExist: (input) => Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}> = Wrapper.doesEmailExist;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ email: string; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.email |
string |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>
EmailPasswordComponentsOverrideProvider
const EmailPasswordComponentsOverrideProvider: any = Wrapper.ComponentsOverrideProvider;
Defined in: recipe/emailpassword/index.ts
getResetPasswordTokenFromURL()
const getResetPasswordTokenFromURL: (input?) => string = Wrapper.getResetPasswordTokenFromURL;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input? |
{ userContext?: UserContext; } |
input.userContext? |
UserContext |
Returns
string
init()
const init: (config?) => any = Wrapper.init;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
config? |
UserInput |
Returns
any
sendPasswordResetEmail()
const sendPasswordResetEmail: (input) => Promise<
| {
fetchResponse: Response;
status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}> = Wrapper.sendPasswordResetEmail;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK" | "PASSWORD_RESET_NOT_ALLOWED";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>
signIn()
const signIn: (input) => Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
status: "WRONG_CREDENTIALS_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_NOT_ALLOWED";
}> = Wrapper.signIn;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.shouldTryLinkingWithSessionUser? |
boolean |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
status: "WRONG_CREDENTIALS_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_NOT_ALLOWED";
}>
signOut()
const signOut: (input?) => Promise<void> = Wrapper.signOut;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input? |
{ userContext?: UserContext; } |
input.userContext? |
UserContext |
Returns
Promise<void>
signUp()
const signUp: (input) => Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_UP_NOT_ALLOWED";
}> = Wrapper.signUp;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.shouldTryLinkingWithSessionUser? |
boolean |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
user: User;
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_UP_NOT_ALLOWED";
}>
submitNewPassword()
const submitNewPassword: (input) => Promise<
| {
fetchResponse: Response;
status: "OK";
}
| {
fetchResponse: Response;
status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}> = Wrapper.submitNewPassword;
Defined in: recipe/emailpassword/index.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ formFields: object[]; options?: RecipeFunctionOptions; userContext?: UserContext; } |
input.formFields |
object[] |
input.options? |
RecipeFunctionOptions |
input.userContext? |
UserContext |
Returns
Promise<
| {
fetchResponse: Response;
status: "OK";
}
| {
fetchResponse: Response;
status: "RESET_PASSWORD_INVALID_TOKEN_ERROR";
}
| {
fetchResponse: Response;
formFields: object[];
status: "FIELD_ERROR";
}>
References
GetRedirectionURLContext
Re-exports GetRedirectionURLContext
OnHandleEventContext
Re-exports OnHandleEventContext
PreAPIHookContext
Re-exports PreAPIHookContext
RecipeInterface
Renames and re-exports SuperTokensWrapper
UserInput
Re-exports UserInput