---
title: supertokens-node/recipe/thirdparty
description: References documentation for the supertokens-node/recipe/thirdparty package
sidebar:
  order: 70
---

## Classes

### default

Defined in: [recipe/thirdparty/index.ts:25](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L25)

#### Constructors

##### Constructor

```ts check=false reason="Generated API signature"
new default(): default;
```

###### Returns

[`default`](#default)

#### Properties

| Property | Modifier | Type | Default value | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| <a id="member-default-error"></a> `Error` | `static` | *typeof* `default` | `SuperTokensError` | [recipe/thirdparty/index.ts:28](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L28) |
| <a id="member-default-init"></a> `init` | `static` | (`config?`) => [`RecipeListFunction`](types#recipelistfunction) | `Recipe.init` | [recipe/thirdparty/index.ts:26](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L26) |

#### Methods

##### getProvider()

```ts check=false reason="Generated API signature"
static getProvider(
   tenantId, 
   thirdPartyId, 
   clientType, 
userContext?): Promise<TypeProvider>;
```

Defined in: [recipe/thirdparty/index.ts:30](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L30)

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `tenantId` | `string` |
| `thirdPartyId` | `string` |
| `clientType` | `string` |
| `userContext?` | `Record`\<`string`, `any`\> |

###### Returns

`Promise`\<[`TypeProvider`](recipe-thirdparty-types#typeprovider)\>

##### manuallyCreateOrUpdateUser()

###### Call Signature

```ts check=false reason="Generated API 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:44](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L44)

###### 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`](index#recipeuserid-1);
  `status`: `"OK"`;
  `user`: [`User`](types#user);
\}
  \| \{
  `reason`: `string`;
  `status`: `"EMAIL_CHANGE_NOT_ALLOWED_ERROR"`;
\}
  \| \{
  `reason`: `string`;
  `status`: `"SIGN_IN_UP_NOT_ALLOWED"`;
\}\>

###### Call Signature

```ts check=false reason="Generated API 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:68](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L68)

###### 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`](index#recipeuserid-1);
  `status`: `"OK"`;
  `user`: [`User`](types#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

```ts check=false reason="Generated API signature"
Error: typeof default = Wrapper.Error;
```

Defined in: [recipe/thirdparty/index.ts:147](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L147)

***

### getProvider()

```ts check=false reason="Generated API signature"
getProvider: (tenantId, thirdPartyId, clientType, userContext?) => Promise<TypeProvider> = Wrapper.getProvider;
```

Defined in: [recipe/thirdparty/index.ts:149](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L149)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `tenantId` | `string` |
| `thirdPartyId` | `string` |
| `clientType` | `string` |
| `userContext?` | `Record`\<`string`, `any`\> |

#### Returns

`Promise`\<[`TypeProvider`](recipe-thirdparty-types#typeprovider)\>

***

### init()

```ts check=false reason="Generated API signature"
init: (config?) => RecipeListFunction = Wrapper.init;
```

Defined in: [recipe/thirdparty/index.ts:145](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L145)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `config?` | [`TypeInput`](recipe-thirdparty-types#typeinput) |

#### Returns

[`RecipeListFunction`](types#recipelistfunction)

***

### manuallyCreateOrUpdateUser()

```ts check=false reason="Generated API signature"
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:151](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/thirdparty/index.ts#L151)

#### Call Signature

```ts check=false reason="Generated API 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`](index#recipeuserid-1);
  `status`: `"OK"`;
  `user`: [`User`](types#user);
\}
  \| \{
  `reason`: `string`;
  `status`: `"EMAIL_CHANGE_NOT_ALLOWED_ERROR"`;
\}
  \| \{
  `reason`: `string`;
  `status`: `"SIGN_IN_UP_NOT_ALLOWED"`;
\}\>

#### Call Signature

```ts check=false reason="Generated API 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`](index#recipeuserid-1);
  `status`: `"OK"`;
  `user`: [`User`](types#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](recipe-thirdparty-types#apiinterface)

***

### APIOptions

Re-exports [APIOptions](recipe-thirdparty-types#apioptions)

***

### RecipeInterface

Re-exports [RecipeInterface](recipe-thirdparty-types#recipeinterface)

***

### TypeProvider

Re-exports [TypeProvider](recipe-thirdparty-types#typeprovider)
