Skip to main content
References

Passwordless

Classes

default

Defined in: recipe/passwordless/index.ts:30

Constructors

Constructor
new default(): default;
Returns

default

Properties

PropertyModifierTypeDefault valueDefined in
ComponentsOverrideProviderstaticanyRecipeComponentsOverrideContextProviderrecipe/passwordless/index.ts:196

Methods

clearLoginAttemptInfo()
static clearLoginAttemptInfo(input?): Promise<void>;

Defined in: recipe/passwordless/index.ts:189

Parameters
ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext
Returns

Promise<void>

consumeCode()
static consumeCode(input?): Promise<
| {
createdNewRecipeUser: boolean;
fetchResponse: Response;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
fetchResponse: Response;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
fetchResponse: Response;
status: "RESTART_FLOW_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}>;

Defined in: recipe/passwordless/index.ts:84

Parameters
ParameterType
input?| { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string; } | { options?: RecipeFunctionOptions; userContext?: UserContext; }
Returns

Promise< | { createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR"; } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

createCode()
static createCode(input): Promise<
| {
deviceId: string;
fetchResponse: Response;
flowType: PasswordlessFlowType;
preAuthSessionId: string;
status: "OK";
}
| {
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}>;

Defined in: recipe/passwordless/index.ts:41

Parameters
ParameterType
input| { email: string; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } | { options?: RecipeFunctionOptions; phoneNumber: string; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; }
Returns

Promise< | { deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

doesEmailExist()
static doesEmailExist(input): Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>;

Defined in: recipe/passwordless/index.ts:131

Parameters
ParameterType
input{ email: string; options?: RecipeFunctionOptions; userContext?: UserContext; }
input.emailstring
input.options?RecipeFunctionOptions
input.userContext?UserContext
Returns

Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }>

doesPhoneNumberExist()
static doesPhoneNumberExist(input): Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>;

Defined in: recipe/passwordless/index.ts:146

Parameters
ParameterType
input{ options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext; }
input.options?RecipeFunctionOptions
input.phoneNumberstring
input.userContext?UserContext
Returns

Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }>

getLinkCodeFromURL()
static getLinkCodeFromURL(input?): string;

Defined in: recipe/passwordless/index.ts:117

Parameters
ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext
Returns

string

getLoginAttemptInfo()
static getLoginAttemptInfo<CustomLoginAttemptInfoProperties>(input?): Promise<object & CustomLoginAttemptInfoProperties>;

Defined in: recipe/passwordless/index.ts:161

Type Parameters
Type Parameter
CustomLoginAttemptInfoProperties
Parameters
ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext
Returns

Promise<object & CustomLoginAttemptInfoProperties>

getPreAuthSessionIdFromURL()
static getPreAuthSessionIdFromURL(input?): string;

Defined in: recipe/passwordless/index.ts:124

Parameters
ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext
Returns

string

init()
static init(config): any;

Defined in: recipe/passwordless/index.ts:31

Parameters
ParameterType
configUserInput
Returns

any

resendCode()
static resendCode(input?): Promise<{
fetchResponse: Response;
status: "OK" | "RESTART_FLOW_ERROR";
}>;

Defined in: recipe/passwordless/index.ts:74

Parameters
ParameterType
input?{ options?: RecipeFunctionOptions; userContext?: UserContext; }
input.options?RecipeFunctionOptions
input.userContext?UserContext
Returns

Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR"; }>

setLoginAttemptInfo()
static setLoginAttemptInfo<CustomStateProperties>(input): Promise<void>;

Defined in: recipe/passwordless/index.ts:175

Type Parameters
Type Parameter
CustomStateProperties
Parameters
ParameterType
input{ attemptInfo: object & CustomStateProperties; userContext?: UserContext; }
input.attemptInfoobject & CustomStateProperties
input.userContext?UserContext
Returns

Promise<void>

signOut()
static signOut(input?): Promise<void>;

Defined in: recipe/passwordless/index.ts:35

Parameters
ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext
Returns

Promise<void>

Variables

clearLoginAttemptInfo()

const clearLoginAttemptInfo: (input?) => Promise<void> = Wrapper.clearLoginAttemptInfo;

Defined in: recipe/passwordless/index.ts:209

Parameters

ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext

Returns

Promise<void>

consumeCode()

const consumeCode: (input?) => Promise<
| {
createdNewRecipeUser: boolean;
fetchResponse: Response;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
fetchResponse: Response;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
fetchResponse: Response;
status: "RESTART_FLOW_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}> = Wrapper.consumeCode;

Defined in: recipe/passwordless/index.ts:202

Parameters

ParameterType
input?| { options?: RecipeFunctionOptions; userContext?: UserContext; userInputCode: string; } | { options?: RecipeFunctionOptions; userContext?: UserContext; }

Returns

Promise< | { createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; fetchResponse: Response; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { fetchResponse: Response; status: "RESTART_FLOW_ERROR"; } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

createCode()

const createCode: (input) => Promise<
| {
deviceId: string;
fetchResponse: Response;
flowType: PasswordlessFlowType;
preAuthSessionId: string;
status: "OK";
}
| {
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}> = Wrapper.createCode;

Defined in: recipe/passwordless/index.ts:200

Parameters

ParameterType
input| { email: string; options?: RecipeFunctionOptions; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; } | { options?: RecipeFunctionOptions; phoneNumber: string; shouldTryLinkingWithSessionUser?: boolean; userContext?: UserContext; }

Returns

Promise< | { deviceId: string; fetchResponse: Response; flowType: PasswordlessFlowType; preAuthSessionId: string; status: "OK"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

doesEmailExist()

const doesEmailExist: (input) => Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}> = Wrapper.doesEmailExist;

Defined in: recipe/passwordless/index.ts:205

Parameters

ParameterType
input{ email: string; options?: RecipeFunctionOptions; userContext?: UserContext; }
input.emailstring
input.options?RecipeFunctionOptions
input.userContext?UserContext

Returns

Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }>

doesPhoneNumberExist()

const doesPhoneNumberExist: (input) => Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}> = Wrapper.doesPhoneNumberExist;

Defined in: recipe/passwordless/index.ts:206

Parameters

ParameterType
input{ options?: RecipeFunctionOptions; phoneNumber: string; userContext?: UserContext; }
input.options?RecipeFunctionOptions
input.phoneNumberstring
input.userContext?UserContext

Returns

Promise<{ doesExist: boolean; fetchResponse: Response; status: "OK"; }>

getLinkCodeFromURL()

const getLinkCodeFromURL: (input?) => string = Wrapper.getLinkCodeFromURL;

Defined in: recipe/passwordless/index.ts:203

Parameters

ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext

Returns

string

getLoginAttemptInfo()

const getLoginAttemptInfo: <CustomLoginAttemptInfoProperties>(input?) => Promise<object & CustomLoginAttemptInfoProperties> = Wrapper.getLoginAttemptInfo;

Defined in: recipe/passwordless/index.ts:207

Type Parameters

Type Parameter
CustomLoginAttemptInfoProperties

Parameters

ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext

Returns

Promise<object & CustomLoginAttemptInfoProperties>

getPreAuthSessionIdFromURL()

const getPreAuthSessionIdFromURL: (input?) => string = Wrapper.getPreAuthSessionIdFromURL;

Defined in: recipe/passwordless/index.ts:204

Parameters

ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext

Returns

string

init()

const init: (config) => any = Wrapper.init;

Defined in: recipe/passwordless/index.ts:199

Parameters

ParameterType
configUserInput

Returns

any

PasswordlessComponentsOverrideProvider

const PasswordlessComponentsOverrideProvider: any = Wrapper.ComponentsOverrideProvider;

Defined in: recipe/passwordless/index.ts:211

resendCode()

const resendCode: (input?) => Promise<{
fetchResponse: Response;
status: "OK" | "RESTART_FLOW_ERROR";
}> = Wrapper.resendCode;

Defined in: recipe/passwordless/index.ts:201

Parameters

ParameterType
input?{ options?: RecipeFunctionOptions; userContext?: UserContext; }
input.options?RecipeFunctionOptions
input.userContext?UserContext

Returns

Promise<{ fetchResponse: Response; status: "OK" | "RESTART_FLOW_ERROR"; }>

setLoginAttemptInfo()

const setLoginAttemptInfo: <CustomStateProperties>(input) => Promise<void> = Wrapper.setLoginAttemptInfo;

Defined in: recipe/passwordless/index.ts:208

Type Parameters

Type Parameter
CustomStateProperties

Parameters

ParameterType
input{ attemptInfo: object & CustomStateProperties; userContext?: UserContext; }
input.attemptInfoobject & CustomStateProperties
input.userContext?UserContext

Returns

Promise<void>

signOut()

const signOut: (input?) => Promise<void> = Wrapper.signOut;

Defined in: recipe/passwordless/index.ts:210

Parameters

ParameterType
input?{ userContext?: UserContext; }
input.userContext?UserContext

Returns

Promise<void>

References

GetRedirectionURLContext

Re-exports GetRedirectionURLContext

OnHandleEventContext

Re-exports OnHandleEventContext

PreAPIHookContext

Re-exports PreAPIHookContext

RecipeInterface

Renames and re-exports SuperTokensWrapper

UserInput

Re-exports UserInput