Skip to content
Esc
navigateopen⌘Jpreview
Dashboard
On this page

supertokens-node/recipe/thirdparty

References documentation for the supertokens-node/recipe/thirdparty package

Classes

default

Defined in: recipe/thirdparty/index.ts

Constructors

Constructor
new default(): default;
Returns

default

Properties

Property Modifier Type Default value Defined in
Error static typeof default SuperTokensError recipe/thirdparty/index.ts
init static (config?) => RecipeListFunction Recipe.init recipe/thirdparty/index.ts

Methods

getProvider()
static getProvider(
   tenantId, 
   thirdPartyId, 
   clientType, 
userContext?): Promise<TypeProvider>;

Defined in: recipe/thirdparty/index.ts

Parameters
Parameter Type
tenantId string
thirdPartyId string
clientType string
userContext? Record<string, any>
Returns

Promise<TypeProvider>

manuallyCreateOrUpdateUser()
Call Signature
static manuallyCreateOrUpdateUser(
   tenantId, 
   thirdPartyId, 
   thirdPartyUserId, 
   email, 
   isVerified, 
   session?, 
   userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}>;

Defined in: recipe/thirdparty/index.ts

Parameters
Parameter Type
tenantId string
thirdPartyId string
thirdPartyUserId string
email string
isVerified boolean
session? undefined
userContext? Record<string, any>
Returns

Promise< | { createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { reason: string; status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

Call Signature
static manuallyCreateOrUpdateUser(
   tenantId, 
   thirdPartyId, 
   thirdPartyUserId, 
   email, 
   isVerified, 
   session, 
   userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}
  | {
  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/thirdparty/index.ts

Parameters
Parameter Type
tenantId string
thirdPartyId string
thirdPartyUserId string
email string
isVerified boolean
session SessionContainerInterface
userContext? Record<string, any>
Returns

Promise< | { createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { reason: string; status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; } | { 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"; }>

Variables

Error

Error: typeof default = Wrapper.Error;

Defined in: recipe/thirdparty/index.ts


getProvider()

getProvider: (tenantId, thirdPartyId, clientType, userContext?) => Promise<TypeProvider> = Wrapper.getProvider;

Defined in: recipe/thirdparty/index.ts

Parameters

Parameter Type
tenantId string
thirdPartyId string
clientType string
userContext? Record<string, any>

Returns

Promise<TypeProvider>


init()

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

Defined in: recipe/thirdparty/index.ts

Parameters

Parameter Type
config? TypeInput

Returns

RecipeListFunction


manuallyCreateOrUpdateUser()

manuallyCreateOrUpdateUser: {
  (tenantId, thirdPartyId, thirdPartyUserId, email, isVerified, session?, userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}>;
  (tenantId, thirdPartyId, thirdPartyUserId, email, isVerified, session, userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}
  | {
  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.manuallyCreateOrUpdateUser;

Defined in: recipe/thirdparty/index.ts

Call Signature

(
   tenantId, 
   thirdPartyId, 
   thirdPartyUserId, 
   email, 
   isVerified, 
   session?, 
   userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}>;
Parameters
Parameter Type
tenantId string
thirdPartyId string
thirdPartyUserId string
email string
isVerified boolean
session? undefined
userContext? Record<string, any>
Returns

Promise< | { createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { reason: string; status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; }>

Call Signature

(
   tenantId, 
   thirdPartyId, 
   thirdPartyUserId, 
   email, 
   isVerified, 
   session, 
   userContext?): Promise<
  | {
  createdNewRecipeUser: boolean;
  recipeUserId: RecipeUserId;
  status: "OK";
  user: User;
}
  | {
  reason: string;
  status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR";
}
  | {
  reason: string;
  status: "SIGN_IN_UP_NOT_ALLOWED";
}
  | {
  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";
}>;
Parameters
Parameter Type
tenantId string
thirdPartyId string
thirdPartyUserId string
email string
isVerified boolean
session SessionContainerInterface
userContext? Record<string, any>
Returns

Promise< | { createdNewRecipeUser: boolean; recipeUserId: RecipeUserId; status: "OK"; user: User; } | { reason: string; status: "EMAIL_CHANGE_NOT_ALLOWED_ERROR"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; } | { 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"; }>

References

APIInterface

Re-exports APIInterface


APIOptions

Re-exports APIOptions


RecipeInterface

Re-exports RecipeInterface


TypeProvider

Re-exports TypeProvider

API reference

API schema and response details