Skip to main content
References

Passwordless Types

Type Aliases

APIInterface

type APIInterface = object;

Defined in: recipe/passwordless/types.ts:335

Properties

PropertyTypeDefined in
consumeCodePOST?(input) => Promise< | { createdNewRecipeUser: boolean; session: SessionContainerInterface; status: "OK"; user: User; } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; } | { status: "RESTART_FLOW_ERROR"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; } | GeneralErrorResponse>recipe/passwordless/types.ts:368
createCodePOST?(input) => Promise< | { deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; } | GeneralErrorResponse>recipe/passwordless/types.ts:336
emailExistsGET?(input) => Promise< | { exists: boolean; status: "OK"; } | GeneralErrorResponse>recipe/passwordless/types.ts:406
phoneNumberExistsGET?(input) => Promise< | { exists: boolean; status: "OK"; } | GeneralErrorResponse>recipe/passwordless/types.ts:419
resendCodePOST?(input) => Promise< | GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK"; }>recipe/passwordless/types.ts:358

APIOptions

type APIOptions = object;

Defined in: recipe/passwordless/types.ts:323

Properties

DeviceType

type DeviceType = object;

Defined in: recipe/passwordless/types.ts:308

Properties

PropertyTypeDefined in
codesobject[]recipe/passwordless/types.ts:316
email?stringrecipe/passwordless/types.ts:313
failedCodeInputAttemptCountnumberrecipe/passwordless/types.ts:311
phoneNumber?stringrecipe/passwordless/types.ts:314
preAuthSessionIdstringrecipe/passwordless/types.ts:309

RecipeInterface

type RecipeInterface = object;

Defined in: recipe/passwordless/types.ts:110

Properties

PropertyTypeDefined in
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"; }>recipe/passwordless/types.ts:203
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"; }>recipe/passwordless/types.ts:155
createCode(input) => Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string; }>recipe/passwordless/types.ts:111
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"; }>recipe/passwordless/types.ts:137
listCodesByDeviceId(input) => Promise<DeviceType | undefined>recipe/passwordless/types.ts:295
listCodesByEmail(input) => Promise<DeviceType[]>recipe/passwordless/types.ts:287
listCodesByPhoneNumber(input) => Promise<DeviceType[]>recipe/passwordless/types.ts:289
listCodesByPreAuthSessionId(input) => Promise<DeviceType | undefined>recipe/passwordless/types.ts:301
revokeAllCodes(input) => Promise<{ status: "OK"; }>recipe/passwordless/types.ts:255
revokeCode(input) => Promise<{ status: "OK"; }>recipe/passwordless/types.ts:271
updateUser(input) => Promise< | { status: | "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; } | { reason: string; status: | "EMAIL_CHANGE_NOT_ALLOWED_ERROR" | "PHONE_NUMBER_CHANGE_NOT_ALLOWED_ERROR"; }>recipe/passwordless/types.ts:236

TypeInput

type TypeInput = 
| {
contactMethod: "PHONE";
validatePhoneNumber?: (phoneNumber, tenantId) => Promise<string | undefined> | string | undefined;
}
| {
contactMethod: "EMAIL";
validateEmailAddress?: (email, tenantId) => Promise<string | undefined> | string | undefined;
}
| {
contactMethod: "EMAIL_OR_PHONE";
validateEmailAddress?: (email, tenantId) => Promise<string | undefined> | string | undefined;
validatePhoneNumber?: (phoneNumber, tenantId) => Promise<string | undefined> | string | undefined;
} & object;

Defined in: recipe/passwordless/types.ts:33

Type Declaration

NameTypeDefined in
emailDelivery?EmailDeliveryTypeInput<TypePasswordlessEmailDeliveryInput>recipe/passwordless/types.ts:56
flowType"USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"recipe/passwordless/types.ts:54
getCustomUserInputCode()?(tenantId, userContext) => Promise<string> | stringrecipe/passwordless/types.ts:61
override?objectrecipe/passwordless/types.ts:63
override.apis()?(originalImplementation, builder) => APIInterfacerecipe/passwordless/types.ts:68
override.functions()?(originalImplementation, builder) => RecipeInterfacerecipe/passwordless/types.ts:64
smsDelivery?SmsDeliveryTypeInput<TypePasswordlessSmsDeliveryInput>recipe/passwordless/types.ts:57

TypeNormalisedInput

type TypeNormalisedInput = 
| {
contactMethod: "PHONE";
validatePhoneNumber: (phoneNumber, tenantId) => Promise<string | undefined> | string | undefined;
}
| {
contactMethod: "EMAIL";
validateEmailAddress: (email, tenantId) => Promise<string | undefined> | string | undefined;
}
| {
contactMethod: "EMAIL_OR_PHONE";
validateEmailAddress: (email, tenantId) => Promise<string | undefined> | string | undefined;
validatePhoneNumber: (phoneNumber, tenantId) => Promise<string | undefined> | string | undefined;
} & object;

Defined in: recipe/passwordless/types.ts:72

Type Declaration

NameTypeDefined in
flowType"USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"recipe/passwordless/types.ts:93
getCustomUserInputCode()?(tenantId, userContext) => Promise<string> | stringrecipe/passwordless/types.ts:97
getEmailDeliveryConfig()() => EmailDeliveryTypeInputWithService<TypePasswordlessEmailDeliveryInput>recipe/passwordless/types.ts:100
getSmsDeliveryConfig()() => SmsDeliveryTypeInputWithService<TypePasswordlessSmsDeliveryInput>recipe/passwordless/types.ts:99
overrideobjectrecipe/passwordless/types.ts:101
override.apis()(originalImplementation, builder) => APIInterfacerecipe/passwordless/types.ts:106
override.functions()(originalImplementation, builder) => RecipeInterfacerecipe/passwordless/types.ts:102

TypePasswordlessEmailDeliveryInput

type TypePasswordlessEmailDeliveryInput = object;

Defined in: recipe/passwordless/types.ts:433

Properties

PropertyTypeDefined in
codeLifetimenumberrecipe/passwordless/types.ts:439
emailstringrecipe/passwordless/types.ts:436
isFirstFactorbooleanrecipe/passwordless/types.ts:435
preAuthSessionIdstringrecipe/passwordless/types.ts:440
tenantIdstringrecipe/passwordless/types.ts:441
type"PASSWORDLESS_LOGIN"recipe/passwordless/types.ts:434
urlWithLinkCode?stringrecipe/passwordless/types.ts:438
userInputCode?stringrecipe/passwordless/types.ts:437

TypePasswordlessSmsDeliveryInput

type TypePasswordlessSmsDeliveryInput = object;

Defined in: recipe/passwordless/types.ts:444

Properties

PropertyTypeDefined in
codeLifetimenumberrecipe/passwordless/types.ts:450
isFirstFactorbooleanrecipe/passwordless/types.ts:446
phoneNumberstringrecipe/passwordless/types.ts:447
preAuthSessionIdstringrecipe/passwordless/types.ts:451
tenantIdstringrecipe/passwordless/types.ts:452
type"PASSWORDLESS_LOGIN"recipe/passwordless/types.ts:445
urlWithLinkCode?stringrecipe/passwordless/types.ts:449
userInputCode?stringrecipe/passwordless/types.ts:448