Skip to main content
References

Account Linking Types

Type Aliases

AccountInfo

type AccountInfo = object;

Defined in: recipe/accountlinking/types.ts:175

Properties

PropertyTypeDefined in
email?stringrecipe/accountlinking/types.ts:176
phoneNumber?stringrecipe/accountlinking/types.ts:177
thirdParty?objectrecipe/accountlinking/types.ts:178
thirdParty.idstringrecipe/accountlinking/types.ts:179
thirdParty.userIdstringrecipe/accountlinking/types.ts:180
webauthn?objectrecipe/accountlinking/types.ts:182
webauthn.credentialIdsstring[]recipe/accountlinking/types.ts:183

AccountInfoInput

type AccountInfoInput = Omit<AccountInfo, "webauthn"> & object;

Defined in: recipe/accountlinking/types.ts:187

Type Declaration

NameTypeDefined in
webauthn?objectrecipe/accountlinking/types.ts:188
webauthn.credentialIdstringrecipe/accountlinking/types.ts:189

AccountInfoWithRecipeId

type AccountInfoWithRecipeId = object & AccountInfo;

Defined in: recipe/accountlinking/types.ts:193

Type Declaration

NameTypeDefined in
recipeId"emailpassword" | "thirdparty" | "passwordless" | "webauthn"recipe/accountlinking/types.ts:194

RecipeInterface

type RecipeInterface = object;

Defined in: recipe/accountlinking/types.ts:71

Properties

PropertyTypeDefined in
canCreatePrimaryUser(input) => Promise< | { status: "OK"; wasAlreadyAPrimaryUser: boolean; } | { description: string; primaryUserId: string; status: | "RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR" | "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; }>recipe/accountlinking/types.ts:84
canLinkAccounts(input) => Promise< | { accountsAlreadyLinked: boolean; status: "OK"; } | { description: string; primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { status: "INPUT_USER_IS_NOT_A_PRIMARY_USER"; }>recipe/accountlinking/types.ts:113
createPrimaryUser(input) => Promise< | { status: "OK"; user: User; wasAlreadyAPrimaryUser: boolean; } | { primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; }>recipe/accountlinking/types.ts:97
deleteUser(input) => Promise<{ status: "OK"; }>recipe/accountlinking/types.ts:168
getUser(input) => Promise<User | undefined>recipe/accountlinking/types.ts:161
getUsers(input) => Promise<{ nextPaginationToken?: string; users: User[]; }>recipe/accountlinking/types.ts:72
linkAccounts(input) => Promise< | { accountsAlreadyLinked: boolean; status: "OK"; user: User; } | { primaryUserId: string; status: "RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; user: User; } | { description: string; primaryUserId: string; status: "ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"; } | { status: "INPUT_USER_IS_NOT_A_PRIMARY_USER"; }>recipe/accountlinking/types.ts:136
listUsersByAccountInfo(input) => Promise<User[]>recipe/accountlinking/types.ts:162
unlinkAccount(input) => Promise<{ status: "OK"; wasLinked: boolean; wasRecipeUserDeleted: boolean; }>recipe/accountlinking/types.ts:156

RecipeLevelUser

type RecipeLevelUser = object & AccountInfoWithRecipeId;

Defined in: recipe/accountlinking/types.ts:197

Type Declaration

TypeInput

type TypeInput = object;

Defined in: recipe/accountlinking/types.ts:21

Properties

PropertyTypeDefined in
onAccountLinked?(user, newAccountInfo, userContext) => Promise<void>recipe/accountlinking/types.ts:22
override?objectrecipe/accountlinking/types.ts:38
override.functions?(originalImplementation, builder) => RecipeInterfacerecipe/accountlinking/types.ts:39
shouldDoAutomaticAccountLinking?(newAccountInfo, user, session, tenantId, userContext) => Promise< | { shouldAutomaticallyLink: false; } | { shouldAutomaticallyLink: true; shouldRequireVerification: boolean; }>recipe/accountlinking/types.ts:23

TypeNormalisedInput

type TypeNormalisedInput = object;

Defined in: recipe/accountlinking/types.ts:46

Properties

PropertyTypeDefined in
onAccountLinked(user, newAccountInfo, userContext) => Promise<void>recipe/accountlinking/types.ts:47
overrideobjectrecipe/accountlinking/types.ts:63
override.functions(originalImplementation, builder) => RecipeInterfacerecipe/accountlinking/types.ts:64
shouldDoAutomaticAccountLinking(newAccountInfo, user, session, tenantId, userContext) => Promise< | { shouldAutomaticallyLink: false; } | { shouldAutomaticallyLink: true; shouldRequireVerification: boolean; }>recipe/accountlinking/types.ts:48