supertokens-node/recipe/thirdparty/types
References documentation for the supertokens-node/recipe/thirdparty/types package
Type Aliases
APIInterface
type APIInterface = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
appleRedirectHandlerPOST |
undefined | (input) => Promise<void> |
recipe/thirdparty/types.ts |
authorisationUrlGET |
| undefined | (input) => Promise< | { pkceCodeVerifier?: string; status: "OK"; urlWithQueryParams: string; } | GeneralErrorResponse> |
recipe/thirdparty/types.ts |
signInUpPOST |
| undefined | (input) => Promise< | { createdNewRecipeUser: boolean; oAuthTokens: { [key: string]: any; }; rawUserInfoFromProvider: { fromIdTokenPayload?: { [key: string]: any; }; fromUserInfoAPI?: { [key: string]: any; }; }; session: SessionContainerInterface; status: "OK"; user: User; } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER"; } | { reason: string; status: "SIGN_IN_UP_NOT_ALLOWED"; } | GeneralErrorResponse> |
recipe/thirdparty/types.ts |
APIOptions
type APIOptions = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
appInfo |
NormalisedAppinfo |
recipe/thirdparty/types.ts |
config |
TypeNormalisedInput |
recipe/thirdparty/types.ts |
isInServerlessEnv |
boolean |
recipe/thirdparty/types.ts |
providers |
ProviderInput[] |
recipe/thirdparty/types.ts |
recipeId |
string |
recipe/thirdparty/types.ts |
recipeImplementation |
RecipeInterface |
recipe/thirdparty/types.ts |
req |
BaseRequest |
recipe/thirdparty/types.ts |
res |
BaseResponse |
recipe/thirdparty/types.ts |
ProviderClientConfig
type ProviderClientConfig = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
additionalConfig? |
object |
recipe/thirdparty/types.ts |
clientId |
string |
recipe/thirdparty/types.ts |
clientSecret? |
string |
recipe/thirdparty/types.ts |
clientType? |
string |
recipe/thirdparty/types.ts |
forcePKCE? |
boolean |
recipe/thirdparty/types.ts |
scope? |
string[] |
recipe/thirdparty/types.ts |
ProviderConfig
type ProviderConfig = CommonProviderConfig & object;
Defined in: recipe/thirdparty/types.ts
Type Declaration
| Name | Type | Defined in |
|---|---|---|
clients? |
ProviderClientConfig[] |
recipe/thirdparty/types.ts |
ProviderConfigForClientType
type ProviderConfigForClientType = ProviderClientConfig & CommonProviderConfig;
Defined in: recipe/thirdparty/types.ts
ProviderInput
type ProviderInput = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
config |
ProviderConfig |
recipe/thirdparty/types.ts |
includeInNonPublicTenantsByDefault? |
boolean |
recipe/thirdparty/types.ts |
override? |
(originalImplementation) => TypeProvider |
recipe/thirdparty/types.ts |
RecipeInterface
type RecipeInterface = object;
Defined in: recipe/thirdparty/types.ts
Methods
getProvider()
getProvider(input): Promise<TypeProvider>;
Defined in: recipe/thirdparty/types.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ clientType?: string; tenantId: string; thirdPartyId: string; userContext: UserContext; } |
input.clientType? |
string |
input.tenantId |
string |
input.thirdPartyId |
string |
input.userContext |
UserContext |
Returns
Promise<TypeProvider>
manuallyCreateOrUpdateUser()
manuallyCreateOrUpdateUser(input): 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/types.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ email: string; isVerified: boolean; session: SessionContainerInterface | undefined; shouldTryLinkingWithSessionUser: boolean | undefined; tenantId: string; thirdPartyId: string; thirdPartyUserId: string; userContext: UserContext; } |
input.email |
string |
input.isVerified |
boolean |
input.session |
SessionContainerInterface | undefined |
input.shouldTryLinkingWithSessionUser |
boolean | undefined |
input.tenantId |
string |
input.thirdPartyId |
string |
input.thirdPartyUserId |
string |
input.userContext |
UserContext |
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";
}>
signInUp()
signInUp(input): Promise<
| {
createdNewRecipeUser: boolean;
oAuthTokens: {
[key: string]: any;
};
rawUserInfoFromProvider: {
fromIdTokenPayload?: {
[key: string]: any;
};
fromUserInfoAPI?: {
[key: string]: any;
};
};
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
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/types.ts
Parameters
| Parameter | Type |
|---|---|
input |
{ email: string; isVerified: boolean; oAuthTokens: { [key: string]: any; }; rawUserInfoFromProvider: { fromIdTokenPayload?: { [key: string]: any; }; fromUserInfoAPI?: { [key: string]: any; }; }; session: SessionContainerInterface | undefined; shouldTryLinkingWithSessionUser: boolean | undefined; tenantId: string; thirdPartyId: string; thirdPartyUserId: string; userContext: UserContext; } |
input.email |
string |
input.isVerified |
boolean |
input.oAuthTokens |
{ [key: string]: any; } |
input.rawUserInfoFromProvider |
{ fromIdTokenPayload?: { [key: string]: any; }; fromUserInfoAPI?: { [key: string]: any; }; } |
input.rawUserInfoFromProvider.fromIdTokenPayload? |
{ [key: string]: any; } |
input.rawUserInfoFromProvider.fromUserInfoAPI? |
{ [key: string]: any; } |
input.session |
SessionContainerInterface | undefined |
input.shouldTryLinkingWithSessionUser |
boolean | undefined |
input.tenantId |
string |
input.thirdPartyId |
string |
input.thirdPartyUserId |
string |
input.userContext |
UserContext |
Returns
Promise<
| {
createdNewRecipeUser: boolean;
oAuthTokens: {
[key: string]: any;
};
rawUserInfoFromProvider: {
fromIdTokenPayload?: {
[key: string]: any;
};
fromUserInfoAPI?: {
[key: string]: any;
};
};
recipeUserId: RecipeUserId;
status: "OK";
user: User;
}
| {
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";
}>
TypeInput
type TypeInput = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
override? |
object |
recipe/thirdparty/types.ts |
override.apis? |
(originalImplementation, builder) => APIInterface |
recipe/thirdparty/types.ts |
override.functions? |
(originalImplementation, builder) => RecipeInterface |
recipe/thirdparty/types.ts |
signInAndUpFeature? |
TypeInputSignInAndUp |
recipe/thirdparty/types.ts |
TypeInputSignInAndUp
type TypeInputSignInAndUp = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
providers? |
ProviderInput[] |
recipe/thirdparty/types.ts |
TypeNormalisedInput
type TypeNormalisedInput = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
override |
object |
recipe/thirdparty/types.ts |
override.apis |
(originalImplementation, builder) => APIInterface |
recipe/thirdparty/types.ts |
override.functions |
(originalImplementation, builder) => RecipeInterface |
recipe/thirdparty/types.ts |
signInAndUpFeature |
TypeNormalisedInputSignInAndUp |
recipe/thirdparty/types.ts |
TypeNormalisedInputSignInAndUp
type TypeNormalisedInputSignInAndUp = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
providers |
ProviderInput[] |
recipe/thirdparty/types.ts |
TypeProvider
type TypeProvider = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
config |
ProviderConfigForClientType |
recipe/thirdparty/types.ts |
exchangeAuthCodeForOAuthTokens |
(input) => Promise<any> |
recipe/thirdparty/types.ts |
getAuthorisationRedirectURL |
(input) => Promise<{ pkceCodeVerifier?: string; urlWithQueryParams: string; }> |
recipe/thirdparty/types.ts |
getConfigForClientType |
(input) => Promise<ProviderConfigForClientType> |
recipe/thirdparty/types.ts |
getUserInfo |
(input) => Promise<UserInfo> |
recipe/thirdparty/types.ts |
id |
string |
recipe/thirdparty/types.ts |
UserInfo
type UserInfo = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
email? |
object |
recipe/thirdparty/types.ts |
email.id |
string |
recipe/thirdparty/types.ts |
email.isVerified |
boolean |
recipe/thirdparty/types.ts |
rawUserInfoFromProvider |
object |
recipe/thirdparty/types.ts |
rawUserInfoFromProvider.fromIdTokenPayload? |
object |
recipe/thirdparty/types.ts |
rawUserInfoFromProvider.fromUserInfoAPI? |
object |
recipe/thirdparty/types.ts |
thirdPartyUserId |
string |
recipe/thirdparty/types.ts |
UserInfoMap
type UserInfoMap = object;
Defined in: recipe/thirdparty/types.ts
Properties
| Property | Type | Defined in |
|---|---|---|
fromIdTokenPayload? |
object |
recipe/thirdparty/types.ts |
fromIdTokenPayload.email? |
string |
recipe/thirdparty/types.ts |
fromIdTokenPayload.emailVerified? |
string |
recipe/thirdparty/types.ts |
fromIdTokenPayload.userId? |
string |
recipe/thirdparty/types.ts |
fromUserInfoAPI? |
object |
recipe/thirdparty/types.ts |
fromUserInfoAPI.email? |
string |
recipe/thirdparty/types.ts |
fromUserInfoAPI.emailVerified? |
string |
recipe/thirdparty/types.ts |
fromUserInfoAPI.userId? |
string |
recipe/thirdparty/types.ts |