Skip to main content
References

Passwordless

Classes

default

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

Constructors

Constructor
new default(): default;
Returns

default

Properties

PropertyModifierTypeDefault valueDefined in
Errorstatictypeof defaultSuperTokensErrorrecipe/passwordless/index.ts:34
initstatic(config) => RecipeListFunctionRecipe.initrecipe/passwordless/index.ts:32

Methods

checkCode()
static checkCode(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
status: "OK";
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}>;

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

This function will only verify the code (not consume it), and: NOT create a new user if it doesn't exist NOT verify the user email if it exists NOT do any linking NOT delete the code unless it returned RESTART_FLOW_ERROR

Parameters
ParameterType
input| { deviceId: string; preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; status: "OK"; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; }>

consumeCode()
Call Signature
static consumeCode(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}>;

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

  1. verifies the code
  2. creates the user if it doesn't exist
  3. tries to link it
  4. marks the email as verified
Parameters
ParameterType
input| { deviceId: string; preAuthSessionId: string; session?: undefined; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; session?: undefined; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; }>

Call Signature
static consumeCode(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}
| {
reason: | "EMAIL_VERIFICATION_REQUIRED"
| "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR";
status: "LINKING_TO_SESSION_USER_FAILED";
}>;

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

  1. verifies the code
  2. creates the user if it doesn't exist
  3. tries to link it
  4. marks the email as verified
Parameters
ParameterType
input| { deviceId: string; preAuthSessionId: string; session: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; session: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; } | { reason: | "EMAIL_VERIFICATION_REQUIRED" | "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR" | "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR" | "SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; status: "LINKING_TO_SESSION_USER_FAILED"; }>

createCode()
static createCode(input): Promise<{
codeId: string;
codeLifetime: number;
deviceId: string;
linkCode: string;
preAuthSessionId: string;
status: "OK";
timeCreated: number;
userInputCode: string;
}>;

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

Parameters
ParameterType
input| { email: string; } | { phoneNumber: string; } & object
Returns

Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string; }>

static createMagicLink(input): Promise<string>;

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

Parameters
ParameterType
input| { email: string; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise<string>

createNewCodeForDevice()
static createNewCodeForDevice(input): Promise<
| {
codeId: string;
codeLifetime: number;
deviceId: string;
linkCode: string;
preAuthSessionId: string;
status: "OK";
timeCreated: number;
userInputCode: string;
}
| {
status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR";
}>;

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

Parameters
ParameterType
input{ deviceId: string; tenantId: string; userContext?: Record<string, any>; userInputCode?: string; }
input.deviceIdstring
input.tenantIdstring
input.userContext?Record<string, any>
input.userInputCode?string
Returns

Promise< | { codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string; } | { status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; }>

listCodesByDeviceId()
static listCodesByDeviceId(input): Promise<DeviceType>;

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

Parameters
ParameterType
input{ deviceId: string; tenantId: string; userContext?: Record<string, any>; }
input.deviceIdstring
input.tenantIdstring
input.userContext?Record<string, any>
Returns

Promise<DeviceType>

listCodesByEmail()
static listCodesByEmail(input): Promise<DeviceType[]>;

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

Parameters
ParameterType
input{ email: string; tenantId: string; userContext?: Record<string, any>; }
input.emailstring
input.tenantIdstring
input.userContext?Record<string, any>
Returns

Promise<DeviceType[]>

listCodesByPhoneNumber()
static listCodesByPhoneNumber(input): Promise<DeviceType[]>;

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

Parameters
ParameterType
input{ phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }
input.phoneNumberstring
input.tenantIdstring
input.userContext?Record<string, any>
Returns

Promise<DeviceType[]>

listCodesByPreAuthSessionId()
static listCodesByPreAuthSessionId(input): Promise<DeviceType>;

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

Parameters
ParameterType
input{ preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }
input.preAuthSessionIdstring
input.tenantIdstring
input.userContext?Record<string, any>
Returns

Promise<DeviceType>

revokeAllCodes()
static revokeAllCodes(input): Promise<{
status: "OK";
}>;

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

Parameters
ParameterType
input| { email: string; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise<{ status: "OK"; }>

revokeCode()
static revokeCode(input): Promise<{
status: "OK";
}>;

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

Parameters
ParameterType
input| { codeId: string; tenantId: string; userContext?: Record<string, any>; } | { preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise<{ status: "OK"; }>

sendEmail()
static sendEmail(input): Promise<void>;

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

Parameters
ParameterType
inputTypePasswordlessEmailDeliveryInput & object
Returns

Promise<void>

sendSms()
static sendSms(input): Promise<void>;

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

Parameters
ParameterType
inputTypePasswordlessSmsDeliveryInput & object
Returns

Promise<void>

signInUp()
static signInUp(input): Promise<{
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: string;
user: User;
}>;

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

Parameters
ParameterType
input| { email: string; session?: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; session?: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise<{ createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: string; user: User; }>

updateUser()
static updateUser(input): Promise<
| {
status: | "OK"
| "EMAIL_ALREADY_EXISTS_ERROR"
| "UNKNOWN_USER_ID_ERROR"
| "PHONE_NUMBER_ALREADY_EXISTS_ERROR";
}
| {
reason: string;
status: | "EMAIL_CHANGE_NOT_ALLOWED_ERROR"
| "PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR";
}>;

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

Parameters
ParameterType
input{ email?: string; phoneNumber?: string; recipeUserId: RecipeUserId; userContext?: Record<string, any>; }
input.email?string
input.phoneNumber?string
input.recipeUserIdRecipeUserId
input.userContext?Record<string, any>
Returns

Promise< | { status: | "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; } | { reason: string; status: | "EMAIL_CHANGE_NOT_ALLOWED_ERROR" | "PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR"; }>

Variables

checkCode()

checkCode: (input) => Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
status: "OK";
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}> = Wrapper.checkCode;

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

This function will only verify the code (not consume it), and: NOT create a new user if it doesn't exist NOT verify the user email if it exists NOT do any linking NOT delete the code unless it returned RESTART_FLOW_ERROR

Parameters

ParameterType
input| { deviceId: string; preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }

Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; status: "OK"; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; }>

consumeCode()

consumeCode: {
(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}>;
(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}
| {
reason: | "EMAIL_VERIFICATION_REQUIRED"
| "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR";
status: "LINKING_TO_SESSION_USER_FAILED";
}>;
} = Wrapper.consumeCode;

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

Call Signature

(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}>;
  1. verifies the code
  2. creates the user if it doesn't exist
  3. tries to link it
  4. marks the email as verified
Parameters
ParameterType
input| { deviceId: string; preAuthSessionId: string; session?: undefined; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; session?: undefined; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; }>

Call Signature

(input): Promise<
| {
consumedDevice: {
email?: string;
failedCodeInputAttemptCount: number;
phoneNumber?: string;
preAuthSessionId: string;
};
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
status: "RESTART_FLOW_ERROR";
}
| {
reason: | "EMAIL_VERIFICATION_REQUIRED"
| "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"
| "SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR";
status: "LINKING_TO_SESSION_USER_FAILED";
}>;
  1. verifies the code
  2. creates the user if it doesn't exist
  3. tries to link it
  4. marks the email as verified
Parameters
ParameterType
input| { deviceId: string; preAuthSessionId: string; session: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; userInputCode: string; } | { linkCode: string; preAuthSessionId: string; session: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; }
Returns

Promise< | { consumedDevice: { email?: string; failedCodeInputAttemptCount: number; phoneNumber?: string; preAuthSessionId: string; }; createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; } | { reason: | "EMAIL_VERIFICATION_REQUIRED" | "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR" | "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR" | "SESSION_USER_ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; status: "LINKING_TO_SESSION_USER_FAILED"; }>

createCode()

createCode: (input) => Promise<{
codeId: string;
codeLifetime: number;
deviceId: string;
linkCode: string;
preAuthSessionId: string;
status: "OK";
timeCreated: number;
userInputCode: string;
}> = Wrapper.createCode;

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

Parameters

ParameterType
input| { email: string; } | { phoneNumber: string; } & object

Returns

Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string; }>

createMagicLink: (input) => Promise<string> = Wrapper.createMagicLink;

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

Parameters

ParameterType
input| { email: string; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }

Returns

Promise<string>

createNewCodeForDevice()

createNewCodeForDevice: (input) => Promise<
| {
codeId: string;
codeLifetime: number;
deviceId: string;
linkCode: string;
preAuthSessionId: string;
status: "OK";
timeCreated: number;
userInputCode: string;
}
| {
status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR";
}> = Wrapper.createNewCodeForDevice;

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

Parameters

ParameterType
input{ deviceId: string; tenantId: string; userContext?: Record<string, any>; userInputCode?: string; }
input.deviceIdstring
input.tenantIdstring
input.userContext?Record<string, any>
input.userInputCode?string

Returns

Promise< | { codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string; } | { status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; }>

Error

Error: typeof default = Wrapper.Error;

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

init()

init: (config) => RecipeListFunction = Wrapper.init;

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

Parameters

ParameterType
configTypeInput

Returns

RecipeListFunction

listCodesByDeviceId()

listCodesByDeviceId: (input) => Promise<DeviceType> = Wrapper.listCodesByDeviceId;

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

Parameters

ParameterType
input{ deviceId: string; tenantId: string; userContext?: Record<string, any>; }
input.deviceIdstring
input.tenantIdstring
input.userContext?Record<string, any>

Returns

Promise<DeviceType>

listCodesByEmail()

listCodesByEmail: (input) => Promise<DeviceType[]> = Wrapper.listCodesByEmail;

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

Parameters

ParameterType
input{ email: string; tenantId: string; userContext?: Record<string, any>; }
input.emailstring
input.tenantIdstring
input.userContext?Record<string, any>

Returns

Promise<DeviceType[]>

listCodesByPhoneNumber()

listCodesByPhoneNumber: (input) => Promise<DeviceType[]> = Wrapper.listCodesByPhoneNumber;

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

Parameters

ParameterType
input{ phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }
input.phoneNumberstring
input.tenantIdstring
input.userContext?Record<string, any>

Returns

Promise<DeviceType[]>

listCodesByPreAuthSessionId()

listCodesByPreAuthSessionId: (input) => Promise<DeviceType> = Wrapper.listCodesByPreAuthSessionId;

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

Parameters

ParameterType
input{ preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }
input.preAuthSessionIdstring
input.tenantIdstring
input.userContext?Record<string, any>

Returns

Promise<DeviceType>

revokeAllCodes()

revokeAllCodes: (input) => Promise<{
status: "OK";
}> = Wrapper.revokeAllCodes;

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

Parameters

ParameterType
input| { email: string; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; tenantId: string; userContext?: Record<string, any>; }

Returns

Promise<{ status: "OK"; }>

revokeCode()

revokeCode: (input) => Promise<{
status: "OK";
}> = Wrapper.revokeCode;

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

Parameters

ParameterType
input| { codeId: string; tenantId: string; userContext?: Record<string, any>; } | { preAuthSessionId: string; tenantId: string; userContext?: Record<string, any>; }

Returns

Promise<{ status: "OK"; }>

sendEmail()

sendEmail: (input) => Promise<void> = Wrapper.sendEmail;

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

Parameters

ParameterType
inputTypePasswordlessEmailDeliveryInput & object

Returns

Promise<void>

sendSms()

sendSms: (input) => Promise<void> = Wrapper.sendSms;

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

Parameters

ParameterType
inputTypePasswordlessSmsDeliveryInput & object

Returns

Promise<void>

signInUp()

signInUp: (input) => Promise<{
createdNewRecipeUser: boolean;
recipeUserId: RecipeUserId;
status: string;
user: User;
}> = Wrapper.signInUp;

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

Parameters

ParameterType
input| { email: string; session?: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; } | { phoneNumber: string; session?: SessionContainerInterface; tenantId: string; userContext?: Record<string, any>; }

Returns

Promise<{ createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: string; user: User; }>

updateUser()

updateUser: (input) => Promise<
| {
status: | "OK"
| "EMAIL_ALREADY_EXISTS_ERROR"
| "UNKNOWN_USER_ID_ERROR"
| "PHONE_NUMBER_ALREADY_EXISTS_ERROR";
}
| {
reason: string;
status: | "EMAIL_CHANGE_NOT_ALLOWED_ERROR"
| "PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR";
}> = Wrapper.updateUser;

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

Parameters

ParameterType
input{ email?: string; phoneNumber?: string; recipeUserId: RecipeUserId; userContext?: Record<string, any>; }
input.email?string
input.phoneNumber?string
input.recipeUserIdRecipeUserId
input.userContext?Record<string, any>

Returns

Promise< | { status: | "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; } | { reason: string; status: | "EMAIL_CHANGE_NOT_ALLOWED_ERROR" | "PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR"; }>

References

APIInterface

Re-exports APIInterface

APIOptions

Re-exports APIOptions

RecipeInterface

Re-exports RecipeInterface