diff --git a/docs/classes/framework.BaseRequest.html b/docs/classes/framework.BaseRequest.html index dcef6baba..7f16849be 100644 --- a/docs/classes/framework.BaseRequest.html +++ b/docs/classes/framework.BaseRequest.html @@ -1 +1 @@ -BaseRequest | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseRequest

Index

Constructors

Properties

getCookieValue: (key_: string) => undefined | string

Type declaration

    • (key_: string): undefined | string
    • Parameters

      • key_: string

      Returns undefined | string

getFormData: () => Promise<any>

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

getHeaderValue: (key: string) => undefined | string

Type declaration

    • (key: string): undefined | string
    • Parameters

      • key: string

      Returns undefined | string

getJSONBody: () => Promise<any>

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

getKeyValueFromQuery: (key: string) => undefined | string

Type declaration

    • (key: string): undefined | string
    • Parameters

      • key: string

      Returns undefined | string

getMethod: () => HTTPMethod

Type declaration

    • (): HTTPMethod
    • Returns HTTPMethod

getOriginalURL: () => string

Type declaration

    • (): string
    • Returns string

original: any
wrapperUsed: boolean

Generated using TypeDoc

\ No newline at end of file +BaseRequest | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseRequest

Index

Constructors

Properties

getCookieValue: (key_: string) => undefined | string

Type declaration

    • (key_: string): undefined | string
    • Parameters

      • key_: string

      Returns undefined | string

getFormData: () => Promise<any>

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

getHeaderValue: (key: string) => undefined | string

Type declaration

    • (key: string): undefined | string
    • Parameters

      • key: string

      Returns undefined | string

getJSONBody: () => Promise<any>

Type declaration

    • (): Promise<any>
    • Returns Promise<any>

getKeyValueFromQuery: (key: string) => undefined | string

Type declaration

    • (key: string): undefined | string
    • Parameters

      • key: string

      Returns undefined | string

getMethod: () => HTTPMethod

Type declaration

    • (): HTTPMethod
    • Returns HTTPMethod

getOriginalURL: () => string

Type declaration

    • (): string
    • Returns string

original: any
wrapperUsed: boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/framework.BaseResponse.html b/docs/classes/framework.BaseResponse.html index 010a7ddc2..e2884231d 100644 --- a/docs/classes/framework.BaseResponse.html +++ b/docs/classes/framework.BaseResponse.html @@ -1 +1 @@ -BaseResponse | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseResponse

Index

Constructors

Properties

original: any
sendHTMLResponse: (html: string) => void

Type declaration

    • (html: string): void
    • Parameters

      • html: string

      Returns void

sendJSONResponse: (content: any) => void

Type declaration

    • (content: any): void
    • Parameters

      • content: any

      Returns void

setCookie: (key: string, value: string, domain: undefined | string, secure: boolean, httpOnly: boolean, expires: number, path: string, sameSite: "strict" | "lax" | "none") => void

Type declaration

    • (key: string, value: string, domain: undefined | string, secure: boolean, httpOnly: boolean, expires: number, path: string, sameSite: "strict" | "lax" | "none"): void
    • Parameters

      • key: string
      • value: string
      • domain: undefined | string
      • secure: boolean
      • httpOnly: boolean
      • expires: number
      • path: string
      • sameSite: "strict" | "lax" | "none"

      Returns void

setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void

Type declaration

    • (key: string, value: string, allowDuplicateKey: boolean): void
    • Parameters

      • key: string
      • value: string
      • allowDuplicateKey: boolean

      Returns void

setStatusCode: (statusCode: number) => void

Type declaration

    • (statusCode: number): void
    • Parameters

      • statusCode: number

      Returns void

wrapperUsed: boolean

Generated using TypeDoc

\ No newline at end of file +BaseResponse | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BaseResponse

Index

Constructors

Properties

original: any
sendHTMLResponse: (html: string) => void

Type declaration

    • (html: string): void
    • Parameters

      • html: string

      Returns void

sendJSONResponse: (content: any) => void

Type declaration

    • (content: any): void
    • Parameters

      • content: any

      Returns void

setCookie: (key: string, value: string, domain: undefined | string, secure: boolean, httpOnly: boolean, expires: number, path: string, sameSite: "strict" | "lax" | "none") => void

Type declaration

    • (key: string, value: string, domain: undefined | string, secure: boolean, httpOnly: boolean, expires: number, path: string, sameSite: "strict" | "lax" | "none"): void
    • Parameters

      • key: string
      • value: string
      • domain: undefined | string
      • secure: boolean
      • httpOnly: boolean
      • expires: number
      • path: string
      • sameSite: "strict" | "lax" | "none"

      Returns void

setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void

Type declaration

    • (key: string, value: string, allowDuplicateKey: boolean): void
    • Parameters

      • key: string
      • value: string
      • allowDuplicateKey: boolean

      Returns void

setStatusCode: (statusCode: number) => void

Type declaration

    • (statusCode: number): void
    • Parameters

      • statusCode: number

      Returns void

wrapperUsed: boolean

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/index.default.html b/docs/classes/index.default.html index d439af754..d7d051fc8 100644 --- a/docs/classes/index.default.html +++ b/docs/classes/index.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => void = SuperTokens.init

Type declaration

    • (config: TypeInput): void
    • Parameters

      • config: TypeInput

      Returns void

Methods

  • createUserIdMapping(input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }): Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }
      • externalUserId: string
      • Optional externalUserIdInfo?: string
      • Optional force?: false | true
      • superTokensUserId: string

    Returns Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>

  • deleteUser(userId: string): Promise<{ status: "OK" }>
  • deleteUserIdMapping(input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ didMappingExist: boolean; status: "OK" }>
  • Parameters

    • input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional force?: false | true
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ didMappingExist: boolean; status: "OK" }>

  • getAllCORSHeaders(): string[]
  • getUserCount(includeRecipeIds?: string[]): Promise<number>
  • Parameters

    • Optional includeRecipeIds: string[]

    Returns Promise<number>

  • getUserIdMapping(input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>

  • getUsersNewestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • getUsersOldestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • updateOrDeleteUserIdMappingInfo(input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional externalUserIdInfo?: string
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => void = SuperTokens.init

Type declaration

    • (config: TypeInput): void
    • Parameters

      • config: TypeInput

      Returns void

Methods

  • createUserIdMapping(input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }): Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }
      • externalUserId: string
      • Optional externalUserIdInfo?: string
      • Optional force?: false | true
      • superTokensUserId: string

    Returns Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>

  • deleteUser(userId: string): Promise<{ status: "OK" }>
  • deleteUserIdMapping(input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ didMappingExist: boolean; status: "OK" }>
  • Parameters

    • input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional force?: false | true
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ didMappingExist: boolean; status: "OK" }>

  • getAllCORSHeaders(): string[]
  • getUserCount(includeRecipeIds?: string[]): Promise<number>
  • Parameters

    • Optional includeRecipeIds: string[]

    Returns Promise<number>

  • getUserIdMapping(input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>

  • getUsersNewestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • getUsersOldestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • updateOrDeleteUserIdMappingInfo(input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional externalUserIdInfo?: string
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ingredients_emaildelivery.default.html b/docs/classes/ingredients_emaildelivery.default.html index c8de0d1da..3ed320114 100644 --- a/docs/classes/ingredients_emaildelivery.default.html +++ b/docs/classes/ingredients_emaildelivery.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • default

Index

Constructors

  • new default<T>(config: TypeInputWithService<T>): default<T>

Properties

ingredientInterfaceImpl: EmailDeliveryInterface<T>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • default

Index

Constructors

  • new default<T>(config: TypeInputWithService<T>): default<T>

Properties

ingredientInterfaceImpl: EmailDeliveryInterface<T>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/ingredients_smsdelivery.default.html b/docs/classes/ingredients_smsdelivery.default.html index 1ba6b20c8..c65d6b9fe 100644 --- a/docs/classes/ingredients_smsdelivery.default.html +++ b/docs/classes/ingredients_smsdelivery.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • default

Index

Constructors

  • new default<T>(config: TypeInputWithService<T>): default<T>

Properties

ingredientInterfaceImpl: SmsDeliveryInterface<T>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

  • default

Index

Constructors

  • new default<T>(config: TypeInputWithService<T>): default<T>

Properties

ingredientInterfaceImpl: SmsDeliveryInterface<T>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_dashboard.default.html b/docs/classes/recipe_dashboard.default.html index 80787e8df..8260405c3 100644 --- a/docs/classes/recipe_dashboard.default.html +++ b/docs/classes/recipe_dashboard.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Constructors

Properties

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Constructors

Properties

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_emailpassword.default.html b/docs/classes/recipe_emailpassword.default.html index b9db4258f..8f91eddd3 100644 --- a/docs/classes/recipe_emailpassword.default.html +++ b/docs/classes/recipe_emailpassword.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • getUserByEmail(email: string, userContext?: any): Promise<undefined | User>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • Parameters

    • token: string
    • newPassword: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • Parameters

    • input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })

    Returns Promise<void>

  • signIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • signUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | User | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • getUserByEmail(email: string, userContext?: any): Promise<undefined | User>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • Parameters

    • token: string
    • newPassword: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • Parameters

    • input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })

    Returns Promise<void>

  • signIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • signUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | User | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_emailverification.default.html b/docs/classes/recipe_emailverification.default.html index b9c8ba46f..af8aa85d6 100644 --- a/docs/classes/recipe_emailverification.default.html +++ b/docs/classes/recipe_emailverification.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, email: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • isEmailVerified(userId: string, email: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • unverifyEmail(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, email: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • isEmailVerified(userId: string, email: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • unverifyEmail(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_jwt.default.html b/docs/classes/recipe_jwt.default.html index 06acea281..d965232f2 100644 --- a/docs/classes/recipe_jwt.default.html +++ b/docs/classes/recipe_jwt.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Methods

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Methods

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_openid.default.html b/docs/classes/recipe_openid.default.html index d07fa7ecf..14b1ba713 100644 --- a/docs/classes/recipe_openid.default.html +++ b/docs/classes/recipe_openid.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = OpenIdRecipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = OpenIdRecipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_passwordless.default.html b/docs/classes/recipe_passwordless.default.html index e43440fa3..b6a4a1672 100644 --- a/docs/classes/recipe_passwordless.default.html +++ b/docs/classes/recipe_passwordless.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserByEmail(input: { email: string; userContext?: any }): Promise<undefined | User>
  • getUserById(input: { userContext?: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | User>
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • Parameters

    • input: { preAuthSessionId: string; userContext?: any }
      • preAuthSessionId: string
      • Optional userContext?: any

    Returns Promise<undefined | DeviceType>

  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • sendEmail(input: TypePasswordlessEmailDeliveryInput & { userContext?: any }): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • Parameters

    • input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: string; user: User }>

  • updateUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserByEmail(input: { email: string; userContext?: any }): Promise<undefined | User>
  • getUserById(input: { userContext?: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | User>
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • Parameters

    • input: { preAuthSessionId: string; userContext?: any }
      • preAuthSessionId: string
      • Optional userContext?: any

    Returns Promise<undefined | DeviceType>

  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • sendEmail(input: TypePasswordlessEmailDeliveryInput & { userContext?: any }): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • Parameters

    • input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: string; user: User }>

  • updateUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_session.default.html b/docs/classes/recipe_session.default.html index 939da7a75..60ff196ca 100644 --- a/docs/classes/recipe_session.default.html +++ b/docs/classes/recipe_session.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • userContext: any = {}

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • createNewSession(res: any, userId: string, accessTokenPayload?: any, sessionData?: any, userContext?: any): Promise<SessionContainer>
  • getAllSessionHandlesForUser(userId: string, userContext?: any): Promise<string[]>
  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>
  • getSessionInformation(sessionHandle: string, userContext?: any): Promise<undefined | SessionInformation>
  • refreshSession(req: any, res: any, userContext?: any): Promise<SessionContainer>
  • regenerateAccessToken(accessToken: string, newAccessTokenPayload?: any, userContext?: any): Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>
  • Parameters

    • accessToken: string
    • Optional newAccessTokenPayload: any
    • userContext: any = {}

    Returns Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>

  • revokeAllSessionsForUser(userId: string, userContext?: any): Promise<string[]>
  • revokeMultipleSessions(sessionHandles: string[], userContext?: any): Promise<string[]>
  • revokeSession(sessionHandle: string, userContext?: any): Promise<boolean>
  • updateAccessTokenPayload(sessionHandle: string, newAccessTokenPayload: any, userContext?: any): Promise<boolean>
  • updateSessionData(sessionHandle: string, newSessionData: any, userContext?: any): Promise<boolean>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Error: typeof default = SuperTokensError
init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • userContext: any = {}

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • createNewSession(res: any, userId: string, accessTokenPayload?: any, sessionData?: any, userContext?: any): Promise<SessionContainer>
  • getAllSessionHandlesForUser(userId: string, userContext?: any): Promise<string[]>
  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>
  • getSessionInformation(sessionHandle: string, userContext?: any): Promise<undefined | SessionInformation>
  • refreshSession(req: any, res: any, userContext?: any): Promise<SessionContainer>
  • regenerateAccessToken(accessToken: string, newAccessTokenPayload?: any, userContext?: any): Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>
  • Parameters

    • accessToken: string
    • Optional newAccessTokenPayload: any
    • userContext: any = {}

    Returns Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>

  • revokeAllSessionsForUser(userId: string, userContext?: any): Promise<string[]>
  • revokeMultipleSessions(sessionHandles: string[], userContext?: any): Promise<string[]>
  • revokeSession(sessionHandle: string, userContext?: any): Promise<boolean>
  • updateAccessTokenPayload(sessionHandle: string, newAccessTokenPayload: any, userContext?: any): Promise<boolean>
  • updateSessionData(sessionHandle: string, newSessionData: any, userContext?: any): Promise<boolean>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_thirdparty.default.html b/docs/classes/recipe_thirdparty.default.html index b3ffa8660..a33da71e3 100644 --- a/docs/classes/recipe_thirdparty.default.html +++ b/docs/classes/recipe_thirdparty.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Parameters

    • userId: string
    • userContext: any = {}

    Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • Parameters

    • userId: string
    • userContext: any = {}

    Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_thirdpartyemailpassword.default.html b/docs/classes/recipe_thirdpartyemailpassword.default.html index e9308d8eb..c0d7f374d 100644 --- a/docs/classes/recipe_thirdpartyemailpassword.default.html +++ b/docs/classes/recipe_thirdpartyemailpassword.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • emailPasswordSignIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • emailPasswordSignUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • emailPasswordSignIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • emailPasswordSignUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_thirdpartypasswordless.default.html b/docs/classes/recipe_thirdpartypasswordless.default.html index f932e1570..3bd2c8d36 100644 --- a/docs/classes/recipe_thirdpartypasswordless.default.html +++ b/docs/classes/recipe_thirdpartypasswordless.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserById(userId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • userId: string
    • userContext: any = {}

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • input: { phoneNumber: string; userContext?: any }
      • phoneNumber: string
      • Optional userContext?: any

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • userContext: any = {}

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • passwordlessSignInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailVerificationEmailDeliveryInput & { userContext?: any }) | (TypePasswordlessEmailDeliveryInput & { userContext?: any })): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updatePasswordlessUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • token: string
    • userContext: any = {}

    Returns Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

Apple: (config: TypeThirdPartyProviderAppleConfig) => TypeProvider = thirdPartyProviders.Apple

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderAppleConfig

      Returns TypeProvider

Discord: (config: TypeThirdPartyProviderDiscordConfig) => TypeProvider = thirdPartyProviders.Discord

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderDiscordConfig

      Returns TypeProvider

Error: typeof default = SuperTokensError
Facebook: (config: TypeThirdPartyProviderFacebookConfig) => TypeProvider = thirdPartyProviders.Facebook

Type declaration

    • (config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderFacebookConfig

      Returns TypeProvider

Github: (config: TypeThirdPartyProviderGithubConfig) => TypeProvider = thirdPartyProviders.Github

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGithubConfig

      Returns TypeProvider

Google: (config: TypeThirdPartyProviderGoogleConfig) => TypeProvider = thirdPartyProviders.Google

Type declaration

    • Parameters

      • config: TypeThirdPartyProviderGoogleConfig

      Returns TypeProvider

GoogleWorkspaces: (config: TypeThirdPartyProviderGoogleWorkspacesConfig) => TypeProvider = thirdPartyProviders.GoogleWorkspaces

Type declaration

    • (config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • Parameters

      • config: TypeThirdPartyProviderGoogleWorkspacesConfig

      Returns TypeProvider

init: (config: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config: TypeInput): RecipeListFunction
    • Parameters

      • config: TypeInput

      Returns RecipeListFunction

Methods

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserById(userId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • userId: string
    • userContext: any = {}

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • input: { phoneNumber: string; userContext?: any }
      • phoneNumber: string
      • Optional userContext?: any

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • userContext: any = {}

    Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

  • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • passwordlessSignInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailVerificationEmailDeliveryInput & { userContext?: any }) | (TypePasswordlessEmailDeliveryInput & { userContext?: any })): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
  • Parameters

    • thirdPartyId: string
    • thirdPartyUserId: string
    • email: { id: string; isVerified: boolean }
      • id: string
      • isVerified: boolean
    • userContext: any = {}

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updatePasswordlessUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
  • Parameters

    • token: string
    • userContext: any = {}

    Returns Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_usermetadata.default.html b/docs/classes/recipe_usermetadata.default.html index 1c77efb6c..2e98e1b1c 100644 --- a/docs/classes/recipe_usermetadata.default.html +++ b/docs/classes/recipe_usermetadata.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • clearUserMetadata(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • getUserMetadata(userId: string, userContext?: any): Promise<{ metadata: any; status: "OK" }>
  • updateUserMetadata(userId: string, metadataUpdate: JSONObject, userContext?: any): Promise<{ metadata: JSONObject; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • clearUserMetadata(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • getUserMetadata(userId: string, userContext?: any): Promise<{ metadata: any; status: "OK" }>
  • updateUserMetadata(userId: string, metadataUpdate: JSONObject, userContext?: any): Promise<{ metadata: JSONObject; status: "OK" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/recipe_userroles.default.html b/docs/classes/recipe_userroles.default.html index 28d5e1d16..47d628c28 100644 --- a/docs/classes/recipe_userroles.default.html +++ b/docs/classes/recipe_userroles.default.html @@ -1 +1 @@ -default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • addRoleToUser(userId: string, role: string, userContext?: any): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • userId: string
    • role: string
    • Optional userContext: any

    Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • createNewRoleOrAddPermissions(role: string, permissions: string[], userContext?: any): Promise<{ createdNewRole: boolean; status: "OK" }>
  • deleteRole(role: string, userContext?: any): Promise<{ didRoleExist: boolean; status: "OK" }>
  • getAllRoles(userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getPermissionsForRole(role: string, userContext?: any): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • Optional userContext: any

    Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • getRolesForUser(userId: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getRolesThatHavePermission(permission: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getUsersThatHaveRole(role: string, userContext?: any): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>

  • removePermissionsFromRole(role: string, permissions: string[], userContext?: any): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
  • removeUserRole(userId: string, role: string, userContext?: any): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • userId: string
    • role: string
    • Optional userContext: any

    Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

Generated using TypeDoc

\ No newline at end of file +default | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Properties

init: (config?: TypeInput) => RecipeListFunction = Recipe.init

Type declaration

    • (config?: TypeInput): RecipeListFunction
    • Parameters

      • Optional config: TypeInput

      Returns RecipeListFunction

Methods

  • addRoleToUser(userId: string, role: string, userContext?: any): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • userId: string
    • role: string
    • Optional userContext: any

    Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • createNewRoleOrAddPermissions(role: string, permissions: string[], userContext?: any): Promise<{ createdNewRole: boolean; status: "OK" }>
  • deleteRole(role: string, userContext?: any): Promise<{ didRoleExist: boolean; status: "OK" }>
  • getAllRoles(userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getPermissionsForRole(role: string, userContext?: any): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • Optional userContext: any

    Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

  • getRolesForUser(userId: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getRolesThatHavePermission(permission: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
  • getUsersThatHaveRole(role: string, userContext?: any): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • role: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>

  • removePermissionsFromRole(role: string, permissions: string[], userContext?: any): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
  • removeUserRole(userId: string, role: string, userContext?: any): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
  • Parameters

    • userId: string
    • role: string
    • Optional userContext: any

    Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/framework_awsLambda.SessionEvent.html b/docs/interfaces/framework_awsLambda.SessionEvent.html index 4b6ce8737..e4a90f468 100644 --- a/docs/interfaces/framework_awsLambda.SessionEvent.html +++ b/docs/interfaces/framework_awsLambda.SessionEvent.html @@ -1 +1 @@ -SessionEvent | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SupertokensLambdaEvent
    • SessionEvent

Index

Properties

body: null | string
headers: APIGatewayProxyEventHeaders
httpMethod: string
isBase64Encoded: boolean
multiValueHeaders: APIGatewayProxyEventMultiValueHeaders
multiValueQueryStringParameters: null | APIGatewayProxyEventMultiValueQueryStringParameters
path: string
pathParameters: null | APIGatewayProxyEventPathParameters
queryStringParameters: null | APIGatewayProxyEventQueryStringParameters
requestContext: APIGatewayEventRequestContextWithAuthorizer<APIGatewayEventDefaultAuthorizerContext>
resource: string
stageVariables: null | APIGatewayProxyEventStageVariables
supertokens: { response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] } }

Type declaration

  • response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] }
    • cookies: string[]
    • headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[]

Generated using TypeDoc

\ No newline at end of file +SessionEvent | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SupertokensLambdaEvent
    • SessionEvent

Index

Properties

body: null | string
headers: APIGatewayProxyEventHeaders
httpMethod: string
isBase64Encoded: boolean
multiValueHeaders: APIGatewayProxyEventMultiValueHeaders
multiValueQueryStringParameters: null | APIGatewayProxyEventMultiValueQueryStringParameters
path: string
pathParameters: null | APIGatewayProxyEventPathParameters
queryStringParameters: null | APIGatewayProxyEventQueryStringParameters
requestContext: APIGatewayEventRequestContextWithAuthorizer<APIGatewayEventDefaultAuthorizerContext>
resource: string
stageVariables: null | APIGatewayProxyEventStageVariables
supertokens: { response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] } }

Type declaration

  • response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] }
    • cookies: string[]
    • headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[]

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/framework_awsLambda.SessionEventV2.html b/docs/interfaces/framework_awsLambda.SessionEventV2.html index fa5c62343..7d7c7ef24 100644 --- a/docs/interfaces/framework_awsLambda.SessionEventV2.html +++ b/docs/interfaces/framework_awsLambda.SessionEventV2.html @@ -1 +1 @@ -SessionEventV2 | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SupertokensLambdaEventV2
    • SessionEventV2

Index

Properties

body?: string
cookies?: string[]
headers: APIGatewayProxyEventHeaders
isBase64Encoded: boolean
pathParameters?: APIGatewayProxyEventPathParameters
queryStringParameters?: APIGatewayProxyEventQueryStringParameters
rawPath: string
rawQueryString: string
requestContext: { accountId: string; apiId: string; authorizer?: { jwt: { claims: {}; scopes: string[] } }; domainName: string; domainPrefix: string; http: { method: string; path: string; protocol: string; sourceIp: string; userAgent: string }; requestId: string; routeKey: string; stage: string; time: string; timeEpoch: number }

Type declaration

  • accountId: string
  • apiId: string
  • Optional authorizer?: { jwt: { claims: {}; scopes: string[] } }
    • jwt: { claims: {}; scopes: string[] }
      • claims: {}
        • [name: string]: string | number | boolean | string[]
      • scopes: string[]
  • domainName: string
  • domainPrefix: string
  • http: { method: string; path: string; protocol: string; sourceIp: string; userAgent: string }
    • method: string
    • path: string
    • protocol: string
    • sourceIp: string
    • userAgent: string
  • requestId: string
  • routeKey: string
  • stage: string
  • time: string
  • timeEpoch: number
routeKey: string
stageVariables?: APIGatewayProxyEventStageVariables
supertokens: { response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] } }

Type declaration

  • response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] }
    • cookies: string[]
    • headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[]
version: string

Generated using TypeDoc

\ No newline at end of file +SessionEventV2 | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SupertokensLambdaEventV2
    • SessionEventV2

Index

Properties

body?: string
cookies?: string[]
headers: APIGatewayProxyEventHeaders
isBase64Encoded: boolean
pathParameters?: APIGatewayProxyEventPathParameters
queryStringParameters?: APIGatewayProxyEventQueryStringParameters
rawPath: string
rawQueryString: string
requestContext: { accountId: string; apiId: string; authorizer?: { jwt: { claims: {}; scopes: string[] } }; domainName: string; domainPrefix: string; http: { method: string; path: string; protocol: string; sourceIp: string; userAgent: string }; requestId: string; routeKey: string; stage: string; time: string; timeEpoch: number }

Type declaration

  • accountId: string
  • apiId: string
  • Optional authorizer?: { jwt: { claims: {}; scopes: string[] } }
    • jwt: { claims: {}; scopes: string[] }
      • claims: {}
        • [name: string]: string | number | boolean | string[]
      • scopes: string[]
  • domainName: string
  • domainPrefix: string
  • http: { method: string; path: string; protocol: string; sourceIp: string; userAgent: string }
    • method: string
    • path: string
    • protocol: string
    • sourceIp: string
    • userAgent: string
  • requestId: string
  • routeKey: string
  • stage: string
  • time: string
  • timeEpoch: number
routeKey: string
stageVariables?: APIGatewayProxyEventStageVariables
supertokens: { response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] } }

Type declaration

  • response: { cookies: string[]; headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[] }
    • cookies: string[]
    • headers: { allowDuplicateKey: boolean; key: string; value: string | number | false | true }[]
version: string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/framework_express.SessionRequest.html b/docs/interfaces/framework_express.SessionRequest.html index c4a34039c..bc6310996 100644 --- a/docs/interfaces/framework_express.SessionRequest.html +++ b/docs/interfaces/framework_express.SessionRequest.html @@ -118,7 +118,7 @@
route: any
secure: boolean

Short-hand for:

req.protocol == 'https'

-
session?: SessionContainer
signedCookies: any
socket: Socket
+
session?: SessionContainer
signedCookies: any
socket: Socket

The net.Socket object associated with the connection.

With HTTPS support, use request.socket.getPeerCertificate() to obtain the client's authentication details.

diff --git a/docs/interfaces/framework_fastify.SessionRequest.html b/docs/interfaces/framework_fastify.SessionRequest.html index 58c16a9ef..b41afb725 100644 --- a/docs/interfaces/framework_fastify.SessionRequest.html +++ b/docs/interfaces/framework_fastify.SessionRequest.html @@ -1,4 +1,4 @@ SessionRequest | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FastifyRequest
    • SessionRequest

Index

Properties

body: unknown
connection: Socket
headers: IncomingHttpHeaders
hostname: string
id: any
ip: string
ips?: string[]
is404: boolean
log: FastifyLoggerInstance
method: string
params: unknown
protocol: "http" | "https"
query: unknown
raw: IncomingMessage
req: IncomingMessage
deprecated

Use raw property

-
routerMethod: string
routerPath: string
socket: Socket
url: string
validationError?: Error & { validation: any; validationContext: string }
+
routerMethod: string
routerPath: string
socket: Socket
url: string
validationError?: Error & { validation: any; validationContext: string }

in order for this to be used the user should ensure they have set the attachValidation option.

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property
  • Class
  • Class with type parameter

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/framework_hapi.SessionRequest.html b/docs/interfaces/framework_hapi.SessionRequest.html index 0de11de09..c017cdd04 100644 --- a/docs/interfaces/framework_hapi.SessionRequest.html +++ b/docs/interfaces/framework_hapi.SessionRequest.html @@ -89,7 +89,7 @@
server: Server

Access: read only and the public server interface. The server object.

-
session?: SessionContainer
state: Dictionary<any>
+
session?: SessionContainer
state: Dictionary<any>

An object containing parsed HTTP state information (cookies) where each key is the cookie name and value is the matching cookie content after processing using any registered cookie definition.

url: URL

The parsed request URI.

diff --git a/docs/interfaces/framework_koa.SessionContext.html b/docs/interfaces/framework_koa.SessionContext.html index 24442881e..6f7171957 100644 --- a/docs/interfaces/framework_koa.SessionContext.html +++ b/docs/interfaces/framework_koa.SessionContext.html @@ -81,7 +81,7 @@
secure: boolean

Short-hand for:

this.protocol == 'https'

-
session?: SessionContainer
socket: Socket
+
session?: SessionContainer
socket: Socket

Return the request socket.

stale: boolean

Check if the request is stale, aka diff --git a/docs/interfaces/framework_loopback.SessionContext.html b/docs/interfaces/framework_loopback.SessionContext.html index 92c0dce71..9a2fbb6db 100644 --- a/docs/interfaces/framework_loopback.SessionContext.html +++ b/docs/interfaces/framework_loopback.SessionContext.html @@ -14,7 +14,7 @@

A flag to tell if the response is finished.

scope: BindingScope

Scope for binding resolution

-
session?: SessionContainer
subscriptionManager: ContextSubscriptionManager
+
session?: SessionContainer
subscriptionManager: ContextSubscriptionManager

Manager for observer subscriptions

tagIndexer: ContextTagIndexer

Indexer for bindings by tag

diff --git a/docs/interfaces/recipe_session.SessionContainer.html b/docs/interfaces/recipe_session.SessionContainer.html index e6b7f832e..e9947240c 100644 --- a/docs/interfaces/recipe_session.SessionContainer.html +++ b/docs/interfaces/recipe_session.SessionContainer.html @@ -1 +1 @@ -SessionContainer | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SessionContainer

Index

Methods

  • getAccessToken(userContext?: any): string
  • getAccessTokenPayload(userContext?: any): any
  • getExpiry(userContext?: any): Promise<number>
  • getHandle(userContext?: any): string
  • getSessionData(userContext?: any): Promise<any>
  • getTimeCreated(userContext?: any): Promise<number>
  • getUserId(userContext?: any): string
  • revokeSession(userContext?: any): Promise<void>
  • updateAccessTokenPayload(newAccessTokenPayload: any, userContext?: any): Promise<void>
  • updateSessionData(newSessionData: any, userContext?: any): Promise<any>

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Method
  • Class
  • Class with type parameter

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +SessionContainer | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SessionContainer

Index

Methods

  • getAccessToken(userContext?: any): string
  • getAccessTokenPayload(userContext?: any): any
  • getExpiry(userContext?: any): Promise<number>
  • getHandle(userContext?: any): string
  • getSessionData(userContext?: any): Promise<any>
  • getTimeCreated(userContext?: any): Promise<number>
  • getUserId(userContext?: any): string
  • revokeSession(userContext?: any): Promise<void>
  • updateAccessTokenPayload(newAccessTokenPayload: any, userContext?: any): Promise<void>
  • updateSessionData(newSessionData: any, userContext?: any): Promise<any>

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Method
  • Class
  • Class with type parameter

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/recipe_session.VerifySessionOptions.html b/docs/interfaces/recipe_session.VerifySessionOptions.html index 548d7320c..446d7948f 100644 --- a/docs/interfaces/recipe_session.VerifySessionOptions.html +++ b/docs/interfaces/recipe_session.VerifySessionOptions.html @@ -1 +1 @@ -VerifySessionOptions | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property
  • Class
  • Class with type parameter

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +VerifySessionOptions | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property
  • Class
  • Class with type parameter

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework.html b/docs/modules/framework.html index e6ccc9c1a..15d78d71e 100644 --- a/docs/modules/framework.html +++ b/docs/modules/framework.html @@ -1 +1 @@ -framework | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_awsLambda.html b/docs/modules/framework_awsLambda.html index 9a7b258ee..4349b4562 100644 --- a/docs/modules/framework_awsLambda.html +++ b/docs/modules/framework_awsLambda.html @@ -1 +1 @@ -framework/awsLambda | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/awsLambda

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/awsLambda | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/awsLambda

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_express.html b/docs/modules/framework_express.html index d1215fdb6..1737d0418 100644 --- a/docs/modules/framework_express.html +++ b/docs/modules/framework_express.html @@ -1 +1 @@ -framework/express | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/express

Index

Functions

  • errorHandler(): (err: any, req: Request, res: Response, next: NextFunction) => Promise<void>
  • Returns (err: any, req: Request, res: Response, next: NextFunction) => Promise<void>

      • (err: any, req: Request, res: Response, next: NextFunction): Promise<void>
      • Parameters

        • err: any
        • req: Request
        • res: Response
        • next: NextFunction

        Returns Promise<void>

  • middleware(): (req: Request, res: Response, next: NextFunction) => Promise<void>
  • Returns (req: Request, res: Response, next: NextFunction) => Promise<void>

      • (req: Request, res: Response, next: NextFunction): Promise<void>
      • Parameters

        • req: Request
        • res: Response
        • next: NextFunction

        Returns Promise<void>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/express | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/express

Index

Functions

  • errorHandler(): (err: any, req: Request, res: Response, next: NextFunction) => Promise<void>
  • Returns (err: any, req: Request, res: Response, next: NextFunction) => Promise<void>

      • (err: any, req: Request, res: Response, next: NextFunction): Promise<void>
      • Parameters

        • err: any
        • req: Request
        • res: Response
        • next: NextFunction

        Returns Promise<void>

  • middleware(): (req: Request, res: Response, next: NextFunction) => Promise<void>
  • Returns (req: Request, res: Response, next: NextFunction) => Promise<void>

      • (req: Request, res: Response, next: NextFunction): Promise<void>
      • Parameters

        • req: Request
        • res: Response
        • next: NextFunction

        Returns Promise<void>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_fastify.html b/docs/modules/framework_fastify.html index 03fa5c733..2d4a5fcd7 100644 --- a/docs/modules/framework_fastify.html +++ b/docs/modules/framework_fastify.html @@ -1 +1 @@ -framework/fastify | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/fastify

Index

Functions

  • errorHandler(): (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>) => Promise<void>
  • Returns (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>) => Promise<void>

      • (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>): Promise<void>
      • Parameters

        • err: any
        • req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>
        • res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>

        Returns Promise<void>

  • plugin(instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>, opts: Record<never, never>, done: (err?: Error) => void): void
  • Parameters

    • instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>
    • opts: Record<never, never>
    • done: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns void

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/fastify | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/fastify

Index

Functions

  • errorHandler(): (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>) => Promise<void>
  • Returns (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>) => Promise<void>

      • (err: any, req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>, res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>): Promise<void>
      • Parameters

        • err: any
        • req: FastifyRequest<RouteGenericInterface, Server, IncomingMessage>
        • res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>

        Returns Promise<void>

  • plugin(instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>, opts: Record<never, never>, done: (err?: Error) => void): void
  • Parameters

    • instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>
    • opts: Record<never, never>
    • done: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns void

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_hapi.html b/docs/modules/framework_hapi.html index 6834ddaba..a629fdcec 100644 --- a/docs/modules/framework_hapi.html +++ b/docs/modules/framework_hapi.html @@ -1 +1 @@ -framework/hapi | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/hapi

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/hapi | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/hapi

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_koa.html b/docs/modules/framework_koa.html index ead5b707d..c78812b22 100644 --- a/docs/modules/framework_koa.html +++ b/docs/modules/framework_koa.html @@ -1 +1 @@ -framework/koa | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/koa

Index

Functions

  • middleware(): (ctx: Context, next: Next) => Promise<void>
  • Returns (ctx: Context, next: Next) => Promise<void>

      • (ctx: Context, next: Next): Promise<void>
      • Parameters

        • ctx: Context
        • next: Next

        Returns Promise<void>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/koa | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/koa

Index

Functions

  • middleware(): (ctx: Context, next: Next) => Promise<void>
  • Returns (ctx: Context, next: Next) => Promise<void>

      • (ctx: Context, next: Next): Promise<void>
      • Parameters

        • ctx: Context
        • next: Next

        Returns Promise<void>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/framework_loopback.html b/docs/modules/framework_loopback.html index 33d53110a..fcc5eefd9 100644 --- a/docs/modules/framework_loopback.html +++ b/docs/modules/framework_loopback.html @@ -1 +1 @@ -framework/loopback | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/loopback

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +framework/loopback | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module framework/loopback

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index a8e6f783f..48aed2dc3 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -1 +1 @@ -index | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Error: typeof default = SuperTokensWrapper.Error

Functions

  • createUserIdMapping(input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }): Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }
      • externalUserId: string
      • Optional externalUserIdInfo?: string
      • Optional force?: false | true
      • superTokensUserId: string

    Returns Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>

  • deleteUser(userId: string): Promise<{ status: "OK" }>
  • deleteUserIdMapping(input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ didMappingExist: boolean; status: "OK" }>
  • Parameters

    • input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional force?: false | true
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ didMappingExist: boolean; status: "OK" }>

  • getAllCORSHeaders(): string[]
  • getUserCount(includeRecipeIds?: string[]): Promise<number>
  • Parameters

    • Optional includeRecipeIds: string[]

    Returns Promise<number>

  • getUserIdMapping(input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>

  • getUsersNewestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • getUsersOldestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • init(config: TypeInput): void
  • updateOrDeleteUserIdMappingInfo(input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional externalUserIdInfo?: string
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +index | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Error: typeof default = SuperTokensWrapper.Error

Functions

  • createUserIdMapping(input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }): Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { externalUserId: string; externalUserIdInfo?: string; force?: false | true; superTokensUserId: string }
      • externalUserId: string
      • Optional externalUserIdInfo?: string
      • Optional force?: false | true
      • superTokensUserId: string

    Returns Promise<{ status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR" } | { doesExternalUserIdExist: boolean; doesSuperTokensUserIdExist: boolean; status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR" }>

  • deleteUser(userId: string): Promise<{ status: "OK" }>
  • deleteUserIdMapping(input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ didMappingExist: boolean; status: "OK" }>
  • Parameters

    • input: { force?: false | true; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional force?: false | true
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ didMappingExist: boolean; status: "OK" }>

  • getAllCORSHeaders(): string[]
  • getUserCount(includeRecipeIds?: string[]): Promise<number>
  • Parameters

    • Optional includeRecipeIds: string[]

    Returns Promise<number>

  • getUserIdMapping(input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ externalUserId: string; externalUserIdInfo: undefined | string; status: "OK"; superTokensUserId: string } | { status: "UNKNOWN_MAPPING_ERROR" }>

  • getUsersNewestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • getUsersOldestFirst(input?: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }): Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>
  • Parameters

    • Optional input: { includeRecipeIds?: string[]; limit?: number; paginationToken?: string }
      • Optional includeRecipeIds?: string[]
      • Optional limit?: number
      • Optional paginationToken?: string

    Returns Promise<{ nextPaginationToken?: string; users: { recipeId: string; user: any }[] }>

  • init(config: TypeInput): void
  • updateOrDeleteUserIdMappingInfo(input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }): Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>
  • Parameters

    • input: { externalUserIdInfo?: string; userId: string; userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY" }
      • Optional externalUserIdInfo?: string
      • userId: string
      • Optional userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"

    Returns Promise<{ status: "OK" | "UNKNOWN_MAPPING_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_dashboard.html b/docs/modules/recipe_dashboard.html index 65ae96e23..004832814 100644 --- a/docs/modules/recipe_dashboard.html +++ b/docs/modules/recipe_dashboard.html @@ -1 +1 @@ -recipe/dashboard | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/dashboard

Index

Type aliases

APIInterface: { dashboardGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<string>) }

Type declaration

  • dashboardGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<string>)
APIOptions: { appInfo: NormalisedAppinfo; config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { getDashboardBundleLocation: any; shouldAllowAccess: any }

Type declaration

  • getDashboardBundleLocation:function
    • getDashboardBundleLocation(input: { userContext: any }): Promise<string>
  • shouldAllowAccess:function
    • shouldAllowAccess(input: { config: TypeNormalisedInput; req: BaseRequest; userContext: any }): Promise<boolean>

Functions

  • init(config: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/dashboard | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/dashboard

Index

Type aliases

APIInterface: { dashboardGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<string>) }

Type declaration

  • dashboardGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<string>)
APIOptions: { appInfo: NormalisedAppinfo; config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { getDashboardBundleLocation: any; shouldAllowAccess: any }

Type declaration

  • getDashboardBundleLocation:function
    • getDashboardBundleLocation(input: { userContext: any }): Promise<string>
  • shouldAllowAccess:function
    • shouldAllowAccess(input: { config: TypeNormalisedInput; req: BaseRequest; userContext: any }): Promise<boolean>

Functions

  • init(config: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_emailpassword.html b/docs/modules/recipe_emailpassword.html index 51e1caf0b..4adb2ab2a 100644 --- a/docs/modules/recipe_emailpassword.html +++ b/docs/modules/recipe_emailpassword.html @@ -1 +1 @@ -recipe/emailpassword | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/emailpassword

Index

Type aliases

APIInterface: { emailExistsGET: undefined | ((input: { email: string; options: APIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>); passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>); signInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>); signUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>) }

Type declaration

  • emailExistsGET: undefined | ((input: { email: string; options: APIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
  • generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>)
  • passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
  • signInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>)
  • signUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypeEmailPasswordEmailDeliveryInput>; emailVerificationRecipeImplementation: RecipeInterface; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { createResetPasswordToken: any; getUserByEmail: any; getUserById: any; resetPasswordUsingToken: any; signIn: any; signUp: any; updateEmailOrPassword: any }

Type declaration

  • createResetPasswordToken:function
    • createResetPasswordToken(input: { userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • Parameters

      • input: { userContext: any; userId: string }
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>

  • getUserByEmail:function
    • getUserByEmail(input: { email: string; userContext: any }): Promise<undefined | User>
  • getUserById:function
    • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
  • resetPasswordUsingToken:function
    • resetPasswordUsingToken(input: { newPassword: string; token: string; userContext: any }): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
    • Parameters

      • input: { newPassword: string; token: string; userContext: any }
        • newPassword: string
        • token: string
        • userContext: any

      Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • signIn:function
    • signIn(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • Parameters

      • input: { email: string; password: string; userContext: any }
        • email: string
        • password: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>

  • signUp:function
    • signUp(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email: string; password: string; userContext: any }
        • email: string
        • password: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>

  • updateEmailOrPassword:function
    • updateEmailOrPassword(input: { email?: string; password?: string; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: string; password?: string; userContext: any; userId: string }
        • Optional email?: string
        • Optional password?: string
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>

User: { email: string; id: string; timeJoined: number }

Type declaration

  • email: string
  • id: string
  • timeJoined: number

Variables

Error: typeof default = Wrapper.Error

Functions

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • getUserByEmail(email: string, userContext?: any): Promise<undefined | User>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • init(config?: TypeInput): RecipeListFunction
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • Parameters

    • token: string
    • newPassword: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • Parameters

    • input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })

    Returns Promise<void>

  • signIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • signUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | User | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/emailpassword | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/emailpassword

Index

Type aliases

APIInterface: { emailExistsGET: undefined | ((input: { email: string; options: APIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>); passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>); signInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>); signUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>) }

Type declaration

  • emailExistsGET: undefined | ((input: { email: string; options: APIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
  • generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>)
  • passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
  • signInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>)
  • signUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: APIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypeEmailPasswordEmailDeliveryInput>; emailVerificationRecipeImplementation: RecipeInterface; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { createResetPasswordToken: any; getUserByEmail: any; getUserById: any; resetPasswordUsingToken: any; signIn: any; signUp: any; updateEmailOrPassword: any }

Type declaration

  • createResetPasswordToken:function
    • createResetPasswordToken(input: { userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • Parameters

      • input: { userContext: any; userId: string }
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>

  • getUserByEmail:function
    • getUserByEmail(input: { email: string; userContext: any }): Promise<undefined | User>
  • getUserById:function
    • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
  • resetPasswordUsingToken:function
    • resetPasswordUsingToken(input: { newPassword: string; token: string; userContext: any }): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
    • Parameters

      • input: { newPassword: string; token: string; userContext: any }
        • newPassword: string
        • token: string
        • userContext: any

      Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • signIn:function
    • signIn(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • Parameters

      • input: { email: string; password: string; userContext: any }
        • email: string
        • password: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>

  • signUp:function
    • signUp(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email: string; password: string; userContext: any }
        • email: string
        • password: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>

  • updateEmailOrPassword:function
    • updateEmailOrPassword(input: { email?: string; password?: string; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: string; password?: string; userContext: any; userId: string }
        • Optional email?: string
        • Optional password?: string
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>

User: { email: string; id: string; timeJoined: number }

Type declaration

  • email: string
  • id: string
  • timeJoined: number

Variables

Error: typeof default = Wrapper.Error

Functions

  • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
  • getUserByEmail(email: string, userContext?: any): Promise<undefined | User>
  • getUserById(userId: string, userContext?: any): Promise<undefined | User>
  • init(config?: TypeInput): RecipeListFunction
  • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
  • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
  • Parameters

    • token: string
    • newPassword: string
    • Optional userContext: any

    Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

  • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
  • Parameters

    • input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })

    Returns Promise<void>

  • signIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
  • signUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
  • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
  • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
  • Parameters

    • input: { email?: string; password?: string; userContext?: any; userId: string }
      • Optional email?: string
      • Optional password?: string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

  • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | User | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_emailverification.html b/docs/modules/recipe_emailverification.html index 398c4a5dd..84420dc08 100644 --- a/docs/modules/recipe_emailverification.html +++ b/docs/modules/recipe_emailverification.html @@ -1 +1 @@ -recipe/emailverification | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/emailverification

Index

Type aliases

APIInterface: { generateEmailVerifyTokenPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK" } | GeneralErrorResponse>); isEmailVerifiedGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ isVerified: boolean; status: "OK" } | GeneralErrorResponse>); verifyEmailPOST: undefined | ((input: { options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>) }

Type declaration

  • generateEmailVerifyTokenPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK" } | GeneralErrorResponse>)
  • isEmailVerifiedGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ isVerified: boolean; status: "OK" } | GeneralErrorResponse>)
  • verifyEmailPOST: undefined | ((input: { options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypeEmailVerificationEmailDeliveryInput>; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { createEmailVerificationToken: any; isEmailVerified: any; revokeEmailVerificationTokens: any; unverifyEmail: any; verifyEmailUsingToken: any }

Type declaration

  • createEmailVerificationToken:function
    • createEmailVerificationToken(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • Parameters

      • input: { email: string; userContext: any; userId: string }
        • email: string
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

  • isEmailVerified:function
    • isEmailVerified(input: { email: string; userContext: any; userId: string }): Promise<boolean>
  • revokeEmailVerificationTokens:function
    • revokeEmailVerificationTokens(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK" }>
  • unverifyEmail:function
    • unverifyEmail(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK" }>
  • verifyEmailUsingToken:function
    • verifyEmailUsingToken(input: { token: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
    • Parameters

      • input: { token: string; userContext: any }
        • token: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

User: { email: string; id: string }

Type declaration

  • email: string
  • id: string

Variables

Error: typeof default = Wrapper.Error

Functions

  • createEmailVerificationToken(userId: string, email: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • init(config: TypeInput): RecipeListFunction
  • isEmailVerified(userId: string, email: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • unverifyEmail(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/emailverification | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/emailverification

Index

Type aliases

APIInterface: { generateEmailVerifyTokenPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK" } | GeneralErrorResponse>); isEmailVerifiedGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ isVerified: boolean; status: "OK" } | GeneralErrorResponse>); verifyEmailPOST: undefined | ((input: { options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>) }

Type declaration

  • generateEmailVerifyTokenPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK" } | GeneralErrorResponse>)
  • isEmailVerifiedGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ isVerified: boolean; status: "OK" } | GeneralErrorResponse>)
  • verifyEmailPOST: undefined | ((input: { options: APIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypeEmailVerificationEmailDeliveryInput>; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

RecipeInterface: { createEmailVerificationToken: any; isEmailVerified: any; revokeEmailVerificationTokens: any; unverifyEmail: any; verifyEmailUsingToken: any }

Type declaration

  • createEmailVerificationToken:function
    • createEmailVerificationToken(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • Parameters

      • input: { email: string; userContext: any; userId: string }
        • email: string
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

  • isEmailVerified:function
    • isEmailVerified(input: { email: string; userContext: any; userId: string }): Promise<boolean>
  • revokeEmailVerificationTokens:function
    • revokeEmailVerificationTokens(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK" }>
  • unverifyEmail:function
    • unverifyEmail(input: { email: string; userContext: any; userId: string }): Promise<{ status: "OK" }>
  • verifyEmailUsingToken:function
    • verifyEmailUsingToken(input: { token: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>
    • Parameters

      • input: { token: string; userContext: any }
        • token: string
        • userContext: any

      Returns Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

User: { email: string; id: string }

Type declaration

  • email: string
  • id: string

Variables

Error: typeof default = Wrapper.Error

Functions

  • createEmailVerificationToken(userId: string, email: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
  • init(config: TypeInput): RecipeListFunction
  • isEmailVerified(userId: string, email: string, userContext?: any): Promise<boolean>
  • revokeEmailVerificationTokens(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
  • unverifyEmail(userId: string, email: string, userContext?: any): Promise<{ status: "OK" }>
  • verifyEmailUsingToken(token: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_jwt.html b/docs/modules/recipe_jwt.html index ca0759ebb..fcb8fa88f 100644 --- a/docs/modules/recipe_jwt.html +++ b/docs/modules/recipe_jwt.html @@ -1 +1 @@ -recipe/jwt | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

APIInterface: { getJWKSGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ keys: JsonWebKey[]; status: "OK" } | GeneralErrorResponse>) }

Type declaration

  • getJWKSGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ keys: JsonWebKey[]; status: "OK" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

JsonWebKey: { alg: string; e: string; kid: string; kty: string; n: string; use: string }

Type declaration

  • alg: string
  • e: string
  • kid: string
  • kty: string
  • n: string
  • use: string
RecipeInterface: { createJWT: any; getJWKS: any }

Type declaration

  • createJWT:function
    • createJWT(input: { payload?: any; userContext: any; validitySeconds?: number }): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
    • Parameters

      • input: { payload?: any; userContext: any; validitySeconds?: number }
        • Optional payload?: any
        • userContext: any
        • Optional validitySeconds?: number

      Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS:function
    • getJWKS(input: { userContext: any }): Promise<{ keys: JsonWebKey[]; status: "OK" }>

Functions

  • createJWT(payload: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • init(config?: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/jwt | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

APIInterface: { getJWKSGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ keys: JsonWebKey[]; status: "OK" } | GeneralErrorResponse>) }

Type declaration

  • getJWKSGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ keys: JsonWebKey[]; status: "OK" } | GeneralErrorResponse>)
APIOptions: { config: TypeNormalisedInput; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

Type declaration

JsonWebKey: { alg: string; e: string; kid: string; kty: string; n: string; use: string }

Type declaration

  • alg: string
  • e: string
  • kid: string
  • kty: string
  • n: string
  • use: string
RecipeInterface: { createJWT: any; getJWKS: any }

Type declaration

  • createJWT:function
    • createJWT(input: { payload?: any; userContext: any; validitySeconds?: number }): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
    • Parameters

      • input: { payload?: any; userContext: any; validitySeconds?: number }
        • Optional payload?: any
        • userContext: any
        • Optional validitySeconds?: number

      Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS:function
    • getJWKS(input: { userContext: any }): Promise<{ keys: JsonWebKey[]; status: "OK" }>

Functions

  • createJWT(payload: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • init(config?: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_openid.html b/docs/modules/recipe_openid.html index e935c53ca..8844d57e6 100644 --- a/docs/modules/recipe_openid.html +++ b/docs/modules/recipe_openid.html @@ -1 +1 @@ -recipe/openid | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/openid

Index

Functions

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>
  • init(config?: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/openid | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/openid

Index

Functions

  • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
  • Parameters

    • Optional payload: any
    • Optional validitySeconds: number
    • Optional userContext: any

    Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

  • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
  • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>
  • init(config?: TypeInput): RecipeListFunction

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_passwordless.html b/docs/modules/recipe_passwordless.html index 3a6e11100..95fa59392 100644 --- a/docs/modules/recipe_passwordless.html +++ b/docs/modules/recipe_passwordless.html @@ -1 +1 @@ -recipe/passwordless | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/passwordless

Index

Type aliases

APIInterface: { consumeCodePOST?: any; createCodePOST?: any; emailExistsGET?: any; phoneNumberExistsGET?: any; resendCodePOST?: any }

Type declaration

  • consumeCodePOST?:function
    • consumeCodePOST(input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { options: APIOptions; userContext: any }) | ({ linkCode: string; preAuthSessionId: string } & { options: APIOptions; userContext: any })): Promise<GeneralErrorResponse | { createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { options: APIOptions; userContext: any }) | ({ linkCode: string; preAuthSessionId: string } & { options: APIOptions; userContext: any })

      Returns Promise<GeneralErrorResponse | { createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCodePOST?:function
    • createCodePOST(input: ({ email: string } & { options: APIOptions; userContext: any }) | ({ phoneNumber: string } & { options: APIOptions; userContext: any })): Promise<GeneralErrorResponse | { deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" }>
    • Parameters

      • input: ({ email: string } & { options: APIOptions; userContext: any }) | ({ phoneNumber: string } & { options: APIOptions; userContext: any })

      Returns Promise<GeneralErrorResponse | { deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" }>

  • emailExistsGET?:function
    • emailExistsGET(input: { email: string; options: APIOptions; userContext: any }): Promise<GeneralErrorResponse | { exists: boolean; status: "OK" }>
  • phoneNumberExistsGET?:function
    • phoneNumberExistsGET(input: { options: APIOptions; phoneNumber: string; userContext: any }): Promise<GeneralErrorResponse | { exists: boolean; status: "OK" }>
  • resendCodePOST?:function
    • resendCodePOST(input: { deviceId: string; preAuthSessionId: string } & { options: APIOptions; userContext: any }): Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypePasswordlessEmailDeliveryInput>; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse; smsDelivery: default<TypePasswordlessSmsDeliveryInput> }

Type declaration

RecipeInterface: { consumeCode: any; createCode: any; createNewCodeForDevice: any; getUserByEmail: any; getUserById: any; getUserByPhoneNumber: any; listCodesByDeviceId: any; listCodesByEmail: any; listCodesByPhoneNumber: any; listCodesByPreAuthSessionId: any; revokeAllCodes: any; revokeCode: any; updateUser: any }

Type declaration

  • consumeCode:function
    • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode:function
    • createCode(input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
    • Parameters

      • input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })

      Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createNewCodeForDevice:function
    • createNewCodeForDevice(input: { deviceId: string; userContext: any; userInputCode?: string }): 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" }>
    • Parameters

      • input: { deviceId: string; userContext: any; userInputCode?: string }
        • deviceId: string
        • userContext: any
        • Optional userInputCode?: string

      Returns 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" }>

  • getUserByEmail:function
    • getUserByEmail(input: { email: string; userContext: any }): Promise<undefined | User>
  • getUserById:function
    • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber:function
    • getUserByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<undefined | User>
  • listCodesByDeviceId:function
    • listCodesByDeviceId(input: { deviceId: string; userContext: any }): Promise<undefined | DeviceType>
  • listCodesByEmail:function
    • listCodesByEmail(input: { email: string; userContext: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber:function
    • listCodesByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId:function
    • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext: any }): Promise<undefined | DeviceType>
  • revokeAllCodes:function
    • revokeAllCodes(input: { email: string; userContext: any } | { phoneNumber: string; userContext: any }): Promise<{ status: "OK" }>
  • revokeCode:function
    • revokeCode(input: { codeId: string; userContext: any }): Promise<{ status: "OK" }>
  • updateUser:function
    • updateUser(input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }
        • Optional email?: string | null
        • Optional phoneNumber?: string | null
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

User: { email?: string; id: string; phoneNumber?: string; timeJoined: number }

Type declaration

  • Optional email?: string
  • id: string
  • Optional phoneNumber?: string
  • timeJoined: number

Variables

Error: typeof default = Wrapper.Error

Functions

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserByEmail(input: { email: string; userContext?: any }): Promise<undefined | User>
  • getUserById(input: { userContext?: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | User>
  • init(config: TypeInput): RecipeListFunction
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • Parameters

    • input: { preAuthSessionId: string; userContext?: any }
      • preAuthSessionId: string
      • Optional userContext?: any

    Returns Promise<undefined | DeviceType>

  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • sendEmail(input: TypePasswordlessEmailDeliveryInput & { userContext?: any }): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • Parameters

    • input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: string; user: User }>

  • updateUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +recipe/passwordless | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/passwordless

Index

Type aliases

APIInterface: { consumeCodePOST?: any; createCodePOST?: any; emailExistsGET?: any; phoneNumberExistsGET?: any; resendCodePOST?: any }

Type declaration

  • consumeCodePOST?:function
    • consumeCodePOST(input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { options: APIOptions; userContext: any }) | ({ linkCode: string; preAuthSessionId: string } & { options: APIOptions; userContext: any })): Promise<GeneralErrorResponse | { createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } & { options: APIOptions; userContext: any }) | ({ linkCode: string; preAuthSessionId: string } & { options: APIOptions; userContext: any })

      Returns Promise<GeneralErrorResponse | { createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCodePOST?:function
    • createCodePOST(input: ({ email: string } & { options: APIOptions; userContext: any }) | ({ phoneNumber: string } & { options: APIOptions; userContext: any })): Promise<GeneralErrorResponse | { deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" }>
    • Parameters

      • input: ({ email: string } & { options: APIOptions; userContext: any }) | ({ phoneNumber: string } & { options: APIOptions; userContext: any })

      Returns Promise<GeneralErrorResponse | { deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" }>

  • emailExistsGET?:function
    • emailExistsGET(input: { email: string; options: APIOptions; userContext: any }): Promise<GeneralErrorResponse | { exists: boolean; status: "OK" }>
  • phoneNumberExistsGET?:function
    • phoneNumberExistsGET(input: { options: APIOptions; phoneNumber: string; userContext: any }): Promise<GeneralErrorResponse | { exists: boolean; status: "OK" }>
  • resendCodePOST?:function
    • resendCodePOST(input: { deviceId: string; preAuthSessionId: string } & { options: APIOptions; userContext: any }): Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>
APIOptions: { config: TypeNormalisedInput; emailDelivery: default<TypePasswordlessEmailDeliveryInput>; isInServerlessEnv: boolean; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse; smsDelivery: default<TypePasswordlessSmsDeliveryInput> }

Type declaration

RecipeInterface: { consumeCode: any; createCode: any; createNewCodeForDevice: any; getUserByEmail: any; getUserById: any; getUserByPhoneNumber: any; listCodesByDeviceId: any; listCodesByEmail: any; listCodesByPhoneNumber: any; listCodesByPreAuthSessionId: any; revokeAllCodes: any; revokeCode: any; updateUser: any }

Type declaration

  • consumeCode:function
    • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode:function
    • createCode(input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
    • Parameters

      • input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })

      Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createNewCodeForDevice:function
    • createNewCodeForDevice(input: { deviceId: string; userContext: any; userInputCode?: string }): 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" }>
    • Parameters

      • input: { deviceId: string; userContext: any; userInputCode?: string }
        • deviceId: string
        • userContext: any
        • Optional userInputCode?: string

      Returns 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" }>

  • getUserByEmail:function
    • getUserByEmail(input: { email: string; userContext: any }): Promise<undefined | User>
  • getUserById:function
    • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber:function
    • getUserByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<undefined | User>
  • listCodesByDeviceId:function
    • listCodesByDeviceId(input: { deviceId: string; userContext: any }): Promise<undefined | DeviceType>
  • listCodesByEmail:function
    • listCodesByEmail(input: { email: string; userContext: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber:function
    • listCodesByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId:function
    • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext: any }): Promise<undefined | DeviceType>
  • revokeAllCodes:function
    • revokeAllCodes(input: { email: string; userContext: any } | { phoneNumber: string; userContext: any }): Promise<{ status: "OK" }>
  • revokeCode:function
    • revokeCode(input: { codeId: string; userContext: any }): Promise<{ status: "OK" }>
  • updateUser:function
    • updateUser(input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }
        • Optional email?: string | null
        • Optional phoneNumber?: string | null
        • userContext: any
        • userId: string

      Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

User: { email?: string; id: string; phoneNumber?: string; timeJoined: number }

Type declaration

  • Optional email?: string
  • id: string
  • Optional phoneNumber?: string
  • timeJoined: number

Variables

Error: typeof default = Wrapper.Error

Functions

  • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
  • Parameters

    • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

  • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
  • Parameters

    • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

    Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

  • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
  • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
  • Parameters

    • input: { deviceId: string; userContext?: any; userInputCode?: string }
      • deviceId: string
      • Optional userContext?: any
      • Optional userInputCode?: string

    Returns 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" }>

  • getUserByEmail(input: { email: string; userContext?: any }): Promise<undefined | User>
  • getUserById(input: { userContext?: any; userId: string }): Promise<undefined | User>
  • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | User>
  • init(config: TypeInput): RecipeListFunction
  • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
  • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
  • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
  • Parameters

    • input: { preAuthSessionId: string; userContext?: any }
      • preAuthSessionId: string
      • Optional userContext?: any

    Returns Promise<undefined | DeviceType>

  • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
  • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
  • sendEmail(input: TypePasswordlessEmailDeliveryInput & { userContext?: any }): Promise<void>
  • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
  • signInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
  • Parameters

    • input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }

    Returns Promise<{ createdNewUser: boolean; status: string; user: User }>

  • updateUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
  • Parameters

    • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
      • Optional email?: null | string
      • Optional phoneNumber?: null | string
      • Optional userContext?: any
      • userId: string

    Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

Legend

  • Variable
  • Function
  • Type alias
  • Class
  • Class with type parameter
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/recipe_session.html b/docs/modules/recipe_session.html index 4f298b0f2..c54e41f8b 100644 --- a/docs/modules/recipe_session.html +++ b/docs/modules/recipe_session.html @@ -1,12 +1,12 @@ -recipe/session | supertokens-node
Options
All
  • Public
  • Public/Protected
  • All
Menu

Module recipe/session

Index

Type aliases

APIInterface: { refreshPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<void>); signOutPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>); verifySession: any }

Type declaration

  • refreshSession:function
  • regenerateAccessToken:function
    • regenerateAccessToken(input: { accessToken: string; newAccessTokenPayload?: any; userContext: any }): Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>
    • Parameters

      • input: { accessToken: string; newAccessTokenPayload?: any; userContext: any }
        • accessToken: string
        • Optional newAccessTokenPayload?: any
        • userContext: any

      Returns Promise<undefined | { accessToken?: { createdTime: number; expiry: number; token: string }; session: { handle: string; userDataInJWT: any; userId: string }; status: "OK" }>

  • revokeAllSessionsForUser:function
    • revokeAllSessionsForUser(input: { userContext: any; userId: string }): Promise<string[]>
  • revokeMultipleSessions:function
    • revokeMultipleSessions(input: { sessionHandles: string[]; userContext: any }): Promise<string[]>
    • Parameters

      • input: { sessionHandles: string[]; userContext: any }
        • sessionHandles: string[]
        • userContext: any

      Returns Promise<string[]>

  • revokeSession:function
    • revokeSession(input: { sessionHandle: string; userContext: any }): Promise<boolean>
  • updateAccessTokenPayload:function
    • updateAccessTokenPayload(input: { newAccessTokenPayload: any; sessionHandle: string; userContext: any }): Promise<boolean>
    • Parameters

      • input: { newAccessTokenPayload: any; sessionHandle: string; userContext: any }
        • newAccessTokenPayload: any
        • sessionHandle: string
        • userContext: any

      Returns Promise<boolean>

  • updateSessionData:function
    • updateSessionData(input: { newSessionData: any; sessionHandle: string; userContext: any }): Promise<boolean>
    • Parameters

      • input: { newSessionData: any; sessionHandle: string; userContext: any }
        • newSessionData: any
        • sessionHandle: string
        • userContext: any

      Returns Promise<boolean>

  • SessionInformation: { accessTokenPayload: any; expiry: number; sessionData: any; sessionHandle: string; timeCreated: number; userId: string }

    Type declaration

    • accessTokenPayload: any
    • expiry: number
    • sessionData: any
    • sessionHandle: string
    • timeCreated: number
    • userId: string

    Variables

    Error: typeof default = SessionWrapper.Error

    Functions

    • createJWT(payload?: any, validitySeconds?: number, userContext?: any): Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>
    • Parameters

      • Optional payload: any
      • Optional validitySeconds: number
      • userContext: any = {}

      Returns Promise<{ jwt: string; status: "OK" } | { status: "UNSUPPORTED_ALGORITHM_ERROR" }>

    • createNewSession(res: any, userId: string, accessTokenPayload?: any, sessionData?: any, userContext?: any): Promise<SessionContainer>
    • getAllSessionHandlesForUser(userId: string, userContext?: any): Promise<string[]>
    • getJWKS(userContext?: any): Promise<{ keys: JsonWebKey[]; status: "OK" }>
    • getOpenIdDiscoveryConfiguration(userContext?: any): Promise<{ issuer: string; jwks_uri: string; status: "OK" }>
    • getSessionInformation(sessionHandle: string, userContext?: any): Promise<undefined | SessionInformation>
    • init(config?: TypeInput): RecipeListFunction
    • refreshSession(req: any, res: any, userContext?: any): Promise<SessionContainer>
    • revokeAllSessionsForUser(userId: string, userContext?: any): Promise<string[]>
    • revokeMultipleSessions(sessionHandles: string[], userContext?: any): Promise<string[]>
    • revokeSession(sessionHandle: string, userContext?: any): Promise<boolean>
    • updateAccessTokenPayload(sessionHandle: string, newAccessTokenPayload: any, userContext?: any): Promise<boolean>
    • updateSessionData(sessionHandle: string, newSessionData: any, userContext?: any): Promise<boolean>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/recipe_thirdparty.html b/docs/modules/recipe_thirdparty.html index b37c3e0d1..ccbd18725 100644 --- a/docs/modules/recipe_thirdparty.html +++ b/docs/modules/recipe_thirdparty.html @@ -1 +1 @@ -recipe/thirdparty | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdparty

    Index

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: APIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: APIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); signInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: APIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: APIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: APIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • signInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: APIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>)
    APIOptions: { appInfo: NormalisedAppinfo; config: TypeNormalisedInput; emailVerificationRecipeImplementation: RecipeInterface; isInServerlessEnv: boolean; providers: TypeProvider[]; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

    Type declaration

    RecipeInterface: { getUserById: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; signInUp: any }

    Type declaration

    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | User>
      • Parameters

        • input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<undefined | User>

    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • signInUp:function
      • signInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    TypeProvider: { id: string; isDefault?: boolean; get: any }

    Type declaration

    • id: string
    • Optional isDefault?: boolean
    • get:function
      • get(redirectURI: undefined | string, authCodeFromRequest: undefined | string, userContext: any): TypeProviderGetResponse
    User: { email: string; id: string; thirdParty: { id: string; userId: string }; timeJoined: number }

    Type declaration

    • email: string
    • id: string
    • thirdParty: { id: string; userId: string }
      • id: string
      • userId: string
    • timeJoined: number

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • Parameters

      • userId: string
      • userContext: any = {}

      Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

    • getUserById(userId: string, userContext?: any): Promise<undefined | User>
    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
    • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +recipe/thirdparty | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdparty

    Index

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: APIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: APIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); signInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: APIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: APIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: APIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • signInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: APIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>)
    APIOptions: { appInfo: NormalisedAppinfo; config: TypeNormalisedInput; emailVerificationRecipeImplementation: RecipeInterface; isInServerlessEnv: boolean; providers: TypeProvider[]; recipeId: string; recipeImplementation: RecipeInterface; req: BaseRequest; res: BaseResponse }

    Type declaration

    RecipeInterface: { getUserById: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; signInUp: any }

    Type declaration

    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | User>
      • Parameters

        • input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<undefined | User>

    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • signInUp:function
      • signInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    TypeProvider: { id: string; isDefault?: boolean; get: any }

    Type declaration

    • id: string
    • Optional isDefault?: boolean
    • get:function
      • get(redirectURI: undefined | string, authCodeFromRequest: undefined | string, userContext: any): TypeProviderGetResponse
    User: { email: string; id: string; thirdParty: { id: string; userId: string }; timeJoined: number }

    Type declaration

    • email: string
    • id: string
    • thirdParty: { id: string; userId: string }
      • id: string
      • userId: string
    • timeJoined: number

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • Parameters

      • userId: string
      • userContext: any = {}

      Returns Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>

    • getUserById(userId: string, userContext?: any): Promise<undefined | User>
    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: TypeEmailVerificationEmailDeliveryInput & { userContext?: any }): Promise<void>
    • signInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/recipe_thirdpartyemailpassword.html b/docs/modules/recipe_thirdpartyemailpassword.html index 34c67effc..4f8e936d7 100644 --- a/docs/modules/recipe_thirdpartyemailpassword.html +++ b/docs/modules/recipe_thirdpartyemailpassword.html @@ -1 +1 @@ -recipe/thirdpartyemailpassword | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdpartyemailpassword

    Index

    References

    Re-exports TypeProvider

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); emailPasswordEmailExistsGET: undefined | ((input: { email: string; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); emailPasswordSignInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>); emailPasswordSignUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>); generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>); passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>); thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • emailPasswordEmailExistsGET: undefined | ((input: { email: string; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • emailPasswordSignInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>)
    • emailPasswordSignUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>)
    • generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>)
    • passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
    • thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>)
    EmailPasswordAPIOptions: APIOptions
    RecipeInterface: { createResetPasswordToken: any; emailPasswordSignIn: any; emailPasswordSignUp: any; getUserById: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; resetPasswordUsingToken: any; thirdPartySignInUp: any; updateEmailOrPassword: any }

    Type declaration

    • createResetPasswordToken:function
      • createResetPasswordToken(input: { userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • emailPasswordSignIn:function
      • emailPasswordSignIn(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • emailPasswordSignUp:function
      • emailPasswordSignUp(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | User>
    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • resetPasswordUsingToken:function
      • resetPasswordUsingToken(input: { newPassword: string; token: string; userContext: any }): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
      • Parameters

        • input: { newPassword: string; token: string; userContext: any }
          • newPassword: string
          • token: string
          • userContext: any

        Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

    • thirdPartySignInUp:function
      • thirdPartySignInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • updateEmailOrPassword:function
      • updateEmailOrPassword(input: { email?: string; password?: string; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>
      • Parameters

        • input: { email?: string; password?: string; userContext: any; userId: string }
          • Optional email?: string
          • Optional password?: string
          • userContext: any
          • userId: string

        Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>

    ThirdPartyAPIOptions: APIOptions
    User: { email: string; id: string; thirdParty?: { id: string; userId: string }; timeJoined: number }

    Type declaration

    • email: string
    • id: string
    • Optional thirdParty?: { id: string; userId: string }
      • id: string
      • userId: string
    • timeJoined: number

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • emailPasswordSignIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • emailPasswordSignUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • getUserById(userId: string, userContext?: any): Promise<undefined | User>
    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
    • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
    • Parameters

      • input: { email?: string; password?: string; userContext?: any; userId: string }
        • Optional email?: string
        • Optional password?: string
        • Optional userContext?: any
        • userId: string

      Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +recipe/thirdpartyemailpassword | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdpartyemailpassword

    Index

    References

    Re-exports TypeProvider

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); emailPasswordEmailExistsGET: undefined | ((input: { email: string; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); emailPasswordSignInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>); emailPasswordSignUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>); generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>); passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>); thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • emailPasswordEmailExistsGET: undefined | ((input: { email: string; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • emailPasswordSignInPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" } | GeneralErrorResponse>)
    • emailPasswordSignUpPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ session: SessionContainer; status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" } | GeneralErrorResponse>)
    • generatePasswordResetTokenPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; userContext: any }) => Promise<{ status: "OK" } | GeneralErrorResponse>)
    • passwordResetPOST: undefined | ((input: { formFields: { id: string; value: string }[]; options: EmailPasswordAPIOptions; token: string; userContext: any }) => Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" } | GeneralErrorResponse>)
    • thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>)
    EmailPasswordAPIOptions: APIOptions
    RecipeInterface: { createResetPasswordToken: any; emailPasswordSignIn: any; emailPasswordSignUp: any; getUserById: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; resetPasswordUsingToken: any; thirdPartySignInUp: any; updateEmailOrPassword: any }

    Type declaration

    • createResetPasswordToken:function
      • createResetPasswordToken(input: { userContext: any; userId: string }): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • emailPasswordSignIn:function
      • emailPasswordSignIn(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • emailPasswordSignUp:function
      • emailPasswordSignUp(input: { email: string; password: string; userContext: any }): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | User>
    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • resetPasswordUsingToken:function
      • resetPasswordUsingToken(input: { newPassword: string; token: string; userContext: any }): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
      • Parameters

        • input: { newPassword: string; token: string; userContext: any }
          • newPassword: string
          • token: string
          • userContext: any

        Returns Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>

    • thirdPartySignInUp:function
      • thirdPartySignInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • updateEmailOrPassword:function
      • updateEmailOrPassword(input: { email?: string; password?: string; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>
      • Parameters

        • input: { email?: string; password?: string; userContext: any; userId: string }
          • Optional email?: string
          • Optional password?: string
          • userContext: any
          • userId: string

        Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" }>

    ThirdPartyAPIOptions: APIOptions
    User: { email: string; id: string; thirdParty?: { id: string; userId: string }; timeJoined: number }

    Type declaration

    • email: string
    • id: string
    • Optional thirdParty?: { id: string; userId: string }
      • id: string
      • userId: string
    • timeJoined: number

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • createResetPasswordToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "UNKNOWN_USER_ID_ERROR" }>
    • emailPasswordSignIn(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "WRONG_CREDENTIALS_ERROR" }>
    • emailPasswordSignUp(email: string, password: string, userContext?: any): Promise<{ status: "OK"; user: User } | { status: "EMAIL_ALREADY_EXISTS_ERROR" }>
    • getUserById(userId: string, userContext?: any): Promise<undefined | User>
    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | User>
    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • resetPasswordUsingToken(token: string, newPassword: string, userContext?: any): Promise<{ status: "OK"; userId?: string } | { status: "RESET_PASSWORD_INVALID_TOKEN_ERROR" }>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: (TypeEmailPasswordPasswordResetEmailDeliveryInput & { userContext?: any }) | (TypeEmailVerificationEmailDeliveryInput & { userContext?: any })): Promise<void>
    • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • updateEmailOrPassword(input: { email?: string; password?: string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>
    • Parameters

      • input: { email?: string; password?: string; userContext?: any; userId: string }
        • Optional email?: string
        • Optional password?: string
        • Optional userContext?: any
        • userId: string

      Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" }>

    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | User>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/recipe_thirdpartypasswordless.html b/docs/modules/recipe_thirdpartypasswordless.html index 097d527e2..1c1044c37 100644 --- a/docs/modules/recipe_thirdpartypasswordless.html +++ b/docs/modules/recipe_thirdpartypasswordless.html @@ -1 +1 @@ -recipe/thirdpartypasswordless | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdpartypasswordless

    Index

    References

    Re-exports TypeProvider

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); consumeCodePOST: undefined | ((input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } | { linkCode: string; preAuthSessionId: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" }>); createCodePOST: undefined | ((input: ({ email: string } | { phoneNumber: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | GeneralErrorResponse>); passwordlessUserEmailExistsGET: undefined | ((input: { email: string; options: PasswordlessAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); passwordlessUserPhoneNumberExistsGET: undefined | ((input: { options: PasswordlessAPIOptions; phoneNumber: string; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); resendCodePOST: undefined | ((input: { deviceId: string; preAuthSessionId: string } & { options: PasswordlessAPIOptions; userContext: any }) => Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>); thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • consumeCodePOST: undefined | ((input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } | { linkCode: string; preAuthSessionId: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" }>)
    • createCodePOST: undefined | ((input: ({ email: string } | { phoneNumber: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | GeneralErrorResponse>)
    • passwordlessUserEmailExistsGET: undefined | ((input: { email: string; options: PasswordlessAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • passwordlessUserPhoneNumberExistsGET: undefined | ((input: { options: PasswordlessAPIOptions; phoneNumber: string; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • resendCodePOST: undefined | ((input: { deviceId: string; preAuthSessionId: string } & { options: PasswordlessAPIOptions; userContext: any }) => Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>)
    • thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>)
    PasswordlessAPIOptions: APIOptions
    RecipeInterface: { consumeCode: any; createCode: any; createNewCodeForDevice: any; getUserById: any; getUserByPhoneNumber: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; listCodesByDeviceId: any; listCodesByEmail: any; listCodesByPhoneNumber: any; listCodesByPreAuthSessionId: any; revokeAllCodes: any; revokeCode: any; thirdPartySignInUp: any; updatePasswordlessUser: any }

    Type declaration

    • consumeCode:function
      • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
      • Parameters

        • input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

    • createCode:function
      • createCode(input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
      • Parameters

        • input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })

        Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

    • createNewCodeForDevice:function
      • createNewCodeForDevice(input: { deviceId: string; userContext: any; userInputCode?: string }): 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" }>
      • Parameters

        • input: { deviceId: string; userContext: any; userInputCode?: string }
          • deviceId: string
          • userContext: any
          • Optional userInputCode?: string

        Returns 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" }>

    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { userContext: any; userId: string }
          • userContext: any
          • userId: string

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByPhoneNumber:function
      • getUserByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { phoneNumber: string; userContext: any }
          • phoneNumber: string
          • userContext: any

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • listCodesByDeviceId:function
      • listCodesByDeviceId(input: { deviceId: string; userContext: any }): Promise<undefined | DeviceType>
    • listCodesByEmail:function
      • listCodesByEmail(input: { email: string; userContext: any }): Promise<DeviceType[]>
    • listCodesByPhoneNumber:function
      • listCodesByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<DeviceType[]>
    • listCodesByPreAuthSessionId:function
      • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext: any }): Promise<undefined | DeviceType>
    • revokeAllCodes:function
      • revokeAllCodes(input: { email: string; userContext: any } | { phoneNumber: string; userContext: any }): Promise<{ status: "OK" }>
    • revokeCode:function
      • revokeCode(input: { codeId: string; userContext: any }): Promise<{ status: "OK" }>
    • thirdPartySignInUp:function
      • thirdPartySignInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • updatePasswordlessUser:function
      • updatePasswordlessUser(input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
      • Parameters

        • input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }
          • Optional email?: string | null
          • Optional phoneNumber?: string | null
          • userContext: any
          • userId: string

        Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

    ThirdPartyAPIOptions: APIOptions
    User: ({ email?: string; phoneNumber?: string } | { email: string; thirdParty: { id: string; userId: string } }) & { id: string; timeJoined: number }

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

    • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
    • Parameters

      • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

      Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
    • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
    • Parameters

      • input: { deviceId: string; userContext?: any; userInputCode?: string }
        • deviceId: string
        • Optional userContext?: any
        • Optional userInputCode?: string

      Returns 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" }>

    • getUserById(userId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • userId: string
      • userContext: any = {}

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • input: { phoneNumber: string; userContext?: any }
        • phoneNumber: string
        • Optional userContext?: any

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • userContext: any = {}

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
    • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
    • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
    • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
    • passwordlessSignInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
    • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
    • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: (TypeEmailVerificationEmailDeliveryInput & { userContext?: any }) | (TypePasswordlessEmailDeliveryInput & { userContext?: any })): Promise<void>
    • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
    • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • updatePasswordlessUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
        • Optional email?: null | string
        • Optional phoneNumber?: null | string
        • Optional userContext?: any
        • userId: string

      Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • token: string
      • userContext: any = {}

      Returns Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +recipe/thirdpartypasswordless | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/thirdpartypasswordless

    Index

    References

    Re-exports TypeProvider

    Type aliases

    APIInterface: { appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>); authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>); consumeCodePOST: undefined | ((input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } | { linkCode: string; preAuthSessionId: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" }>); createCodePOST: undefined | ((input: ({ email: string } | { phoneNumber: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | GeneralErrorResponse>); passwordlessUserEmailExistsGET: undefined | ((input: { email: string; options: PasswordlessAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); passwordlessUserPhoneNumberExistsGET: undefined | ((input: { options: PasswordlessAPIOptions; phoneNumber: string; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>); resendCodePOST: undefined | ((input: { deviceId: string; preAuthSessionId: string } & { options: PasswordlessAPIOptions; userContext: any }) => Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>); thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>) }

    Type declaration

    • appleRedirectHandlerPOST: undefined | ((input: { code: string; options: ThirdPartyAPIOptions; state: string; userContext: any }) => Promise<void>)
    • authorisationUrlGET: undefined | ((input: { options: ThirdPartyAPIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
    • consumeCodePOST: undefined | ((input: ({ deviceId: string; preAuthSessionId: string; userInputCode: string } | { linkCode: string; preAuthSessionId: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" }>)
    • createCodePOST: undefined | ((input: ({ email: string } | { phoneNumber: string }) & { options: PasswordlessAPIOptions; userContext: any }) => Promise<{ deviceId: string; flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; preAuthSessionId: string; status: "OK" } | GeneralErrorResponse>)
    • passwordlessUserEmailExistsGET: undefined | ((input: { email: string; options: PasswordlessAPIOptions; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • passwordlessUserPhoneNumberExistsGET: undefined | ((input: { options: PasswordlessAPIOptions; phoneNumber: string; userContext: any }) => Promise<{ exists: boolean; status: "OK" } | GeneralErrorResponse>)
    • resendCodePOST: undefined | ((input: { deviceId: string; preAuthSessionId: string } & { options: PasswordlessAPIOptions; userContext: any }) => Promise<GeneralErrorResponse | { status: "RESTART_FLOW_ERROR" | "OK" }>)
    • thirdPartySignInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: ThirdPartyAPIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | GeneralErrorResponse | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" }>)
    PasswordlessAPIOptions: APIOptions
    RecipeInterface: { consumeCode: any; createCode: any; createNewCodeForDevice: any; getUserById: any; getUserByPhoneNumber: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; listCodesByDeviceId: any; listCodesByEmail: any; listCodesByPhoneNumber: any; listCodesByPreAuthSessionId: any; revokeAllCodes: any; revokeCode: any; thirdPartySignInUp: any; updatePasswordlessUser: any }

    Type declaration

    • consumeCode:function
      • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
      • Parameters

        • input: { deviceId: string; preAuthSessionId: string; userContext: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext: any }

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

    • createCode:function
      • createCode(input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
      • Parameters

        • input: ({ email: string } & { userContext: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext: any; userInputCode?: string })

        Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

    • createNewCodeForDevice:function
      • createNewCodeForDevice(input: { deviceId: string; userContext: any; userInputCode?: string }): 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" }>
      • Parameters

        • input: { deviceId: string; userContext: any; userInputCode?: string }
          • deviceId: string
          • userContext: any
          • Optional userInputCode?: string

        Returns 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" }>

    • getUserById:function
      • getUserById(input: { userContext: any; userId: string }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { userContext: any; userId: string }
          • userContext: any
          • userId: string

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByPhoneNumber:function
      • getUserByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { phoneNumber: string; userContext: any }
          • phoneNumber: string
          • userContext: any

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByThirdPartyInfo:function
      • getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
      • Parameters

        • input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUsersByEmail:function
      • getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
    • listCodesByDeviceId:function
      • listCodesByDeviceId(input: { deviceId: string; userContext: any }): Promise<undefined | DeviceType>
    • listCodesByEmail:function
      • listCodesByEmail(input: { email: string; userContext: any }): Promise<DeviceType[]>
    • listCodesByPhoneNumber:function
      • listCodesByPhoneNumber(input: { phoneNumber: string; userContext: any }): Promise<DeviceType[]>
    • listCodesByPreAuthSessionId:function
      • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext: any }): Promise<undefined | DeviceType>
    • revokeAllCodes:function
      • revokeAllCodes(input: { email: string; userContext: any } | { phoneNumber: string; userContext: any }): Promise<{ status: "OK" }>
    • revokeCode:function
      • revokeCode(input: { codeId: string; userContext: any }): Promise<{ status: "OK" }>
    • thirdPartySignInUp:function
      • thirdPartySignInUp(input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
      • Parameters

        • input: { email: { id: string; isVerified: boolean }; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
          • email: { id: string; isVerified: boolean }
            • id: string
            • isVerified: boolean
          • thirdPartyId: string
          • thirdPartyUserId: string
          • userContext: any

        Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • updatePasswordlessUser:function
      • updatePasswordlessUser(input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }): Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
      • Parameters

        • input: { email?: string | null; phoneNumber?: string | null; userContext: any; userId: string }
          • Optional email?: string | null
          • Optional phoneNumber?: string | null
          • userContext: any
          • userId: string

        Returns Promise<{ status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

    ThirdPartyAPIOptions: APIOptions
    User: ({ email?: string; phoneNumber?: string } | { email: string; thirdParty: { id: string; userId: string } }) & { id: string; timeJoined: number }

    Variables

    Error: typeof default = Wrapper.Error

    Functions

    • Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider
    • Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider
    • Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider
    • Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider
    • Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider
    • GoogleWorkspaces(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider
    • consumeCode(input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>
    • Parameters

      • input: { deviceId: string; preAuthSessionId: string; userContext?: any; userInputCode: string } | { linkCode: string; preAuthSessionId: string; userContext?: any }

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { failedCodeInputAttemptCount: number; maximumCodeInputAttempts: number; status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR" } | { status: "RESTART_FLOW_ERROR" }>

    • createCode(input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })): Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>
    • Parameters

      • input: ({ email: string } & { userContext?: any; userInputCode?: string }) | ({ phoneNumber: string } & { userContext?: any; userInputCode?: string })

      Returns Promise<{ codeId: string; codeLifetime: number; deviceId: string; linkCode: string; preAuthSessionId: string; status: "OK"; timeCreated: number; userInputCode: string }>

    • createEmailVerificationToken(userId: string, userContext?: any): Promise<{ status: "OK"; token: string } | { status: "EMAIL_ALREADY_VERIFIED_ERROR" }>
    • createMagicLink(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<string>
    • createNewCodeForDevice(input: { deviceId: string; userContext?: any; userInputCode?: string }): 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" }>
    • Parameters

      • input: { deviceId: string; userContext?: any; userInputCode?: string }
        • deviceId: string
        • Optional userContext?: any
        • Optional userInputCode?: string

      Returns 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" }>

    • getUserById(userId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • userId: string
      • userContext: any = {}

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • input: { phoneNumber: string; userContext?: any }
        • phoneNumber: string
        • Optional userContext?: any

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUserByThirdPartyInfo(thirdPartyId: string, thirdPartyUserId: string, userContext?: any): Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • userContext: any = {}

      Returns Promise<undefined | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    • getUsersByEmail(email: string, userContext?: any): Promise<User[]>
    • init(config: TypeInput): RecipeListFunction
    • isEmailVerified(userId: string, userContext?: any): Promise<boolean>
    • listCodesByDeviceId(input: { deviceId: string; userContext?: any }): Promise<undefined | DeviceType>
    • listCodesByEmail(input: { email: string; userContext?: any }): Promise<DeviceType[]>
    • listCodesByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise<DeviceType[]>
    • listCodesByPreAuthSessionId(input: { preAuthSessionId: string; userContext?: any }): Promise<undefined | DeviceType>
    • passwordlessSignInUp(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ createdNewUser: boolean; status: string; user: User }>
    • revokeAllCodes(input: { email: string; userContext?: any } | { phoneNumber: string; userContext?: any }): Promise<{ status: "OK" }>
    • revokeCode(input: { codeId: string; userContext?: any }): Promise<{ status: "OK" }>
    • revokeEmailVerificationTokens(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • sendEmail(input: (TypeEmailVerificationEmailDeliveryInput & { userContext?: any }) | (TypePasswordlessEmailDeliveryInput & { userContext?: any })): Promise<void>
    • sendSms(input: TypePasswordlessSmsDeliveryInput & { userContext?: any }): Promise<void>
    • thirdPartySignInUp(thirdPartyId: string, thirdPartyUserId: string, email: { id: string; isVerified: boolean }, userContext?: any): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
    • Parameters

      • thirdPartyId: string
      • thirdPartyUserId: string
      • email: { id: string; isVerified: boolean }
        • id: string
        • isVerified: boolean
      • userContext: any = {}

      Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>

    • unverifyEmail(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • updatePasswordlessUser(input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }): Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>
    • Parameters

      • input: { email?: null | string; phoneNumber?: null | string; userContext?: any; userId: string }
        • Optional email?: null | string
        • Optional phoneNumber?: null | string
        • Optional userContext?: any
        • userId: string

      Returns Promise<{ status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR" }>

    • verifyEmailUsingToken(token: string, userContext?: any): Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>
    • Parameters

      • token: string
      • userContext: any = {}

      Returns Promise<undefined | { status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR" } | ({ email?: string; phoneNumber?: string } & { id: string; timeJoined: number }) | ({ email: string; thirdParty: { id: string; userId: string } } & { id: string; timeJoined: number })>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/recipe_usermetadata.html b/docs/modules/recipe_usermetadata.html index 90d219200..90e460c56 100644 --- a/docs/modules/recipe_usermetadata.html +++ b/docs/modules/recipe_usermetadata.html @@ -1,4 +1,4 @@ -recipe/usermetadata | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/usermetadata

    Index

    Type aliases

    RecipeInterface: { clearUserMetadata: any; getUserMetadata: any; updateUserMetadata: any }

    Type declaration

    • clearUserMetadata:function
      • clearUserMetadata(input: { userContext: any; userId: string }): Promise<{ status: "OK" }>
    • getUserMetadata:function
      • getUserMetadata(input: { userContext: any; userId: string }): Promise<{ metadata: any; status: "OK" }>
    • updateUserMetadata:function
      • updateUserMetadata(input: { metadataUpdate: JSONObject; userContext: any; userId: string }): Promise<{ metadata: JSONObject; status: "OK" }>
      • +recipe/usermetadata | supertokens-node
        Options
        All
        • Public
        • Public/Protected
        • All
        Menu

        Module recipe/usermetadata

        Index

        Type aliases

        RecipeInterface: { clearUserMetadata: any; getUserMetadata: any; updateUserMetadata: any }

        Type declaration

        • clearUserMetadata:function
          • clearUserMetadata(input: { userContext: any; userId: string }): Promise<{ status: "OK" }>
        • getUserMetadata:function
          • getUserMetadata(input: { userContext: any; userId: string }): Promise<{ metadata: any; status: "OK" }>
        • updateUserMetadata:function
          • updateUserMetadata(input: { metadataUpdate: JSONObject; userContext: any; userId: string }): Promise<{ metadata: JSONObject; status: "OK" }>
          • Updates the metadata object of the user by doing a shallow merge of the stored and the update JSONs and removing properties set to null on the root level of the update object. e.g.:

            @@ -7,4 +7,4 @@
          • update: { "notifications": { "sms": true }, "todos": null }
          • result: { "preferences": { "theme":"dark" }, "notifications": { "sms": true } }
          -

        Parameters

        • input: { metadataUpdate: JSONObject; userContext: any; userId: string }
          • metadataUpdate: JSONObject
          • userContext: any
          • userId: string

        Returns Promise<{ metadata: JSONObject; status: "OK" }>

    Functions

    • clearUserMetadata(userId: string, userContext?: any): Promise<{ status: "OK" }>
    • getUserMetadata(userId: string, userContext?: any): Promise<{ metadata: any; status: "OK" }>
    • init(config?: TypeInput): RecipeListFunction
    • updateUserMetadata(userId: string, metadataUpdate: JSONObject, userContext?: any): Promise<{ metadata: JSONObject; status: "OK" }>

    Legend

    • Variable
    • Function
    • Type alias
    • Class
    • Class with type parameter
    • Interface

    Settings

    Theme

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns Promise<{ metadata: JSONObject; status: "OK" }>

    Functions

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/recipe_userroles.html b/docs/modules/recipe_userroles.html index 8556ce23e..fb21a2146 100644 --- a/docs/modules/recipe_userroles.html +++ b/docs/modules/recipe_userroles.html @@ -1 +1 @@ -recipe/userroles | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/userroles

    Index

    Type aliases

    RecipeInterface: { addRoleToUser: any; createNewRoleOrAddPermissions: any; deleteRole: any; getAllRoles: any; getPermissionsForRole: any; getRolesForUser: any; getRolesThatHavePermission: any; getUsersThatHaveRole: any; removePermissionsFromRole: any; removeUserRole: any }

    Type declaration

    • addRoleToUser:function
      • addRoleToUser(input: { role: string; userContext: any; userId: string }): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any; userId: string }
          • role: string
          • userContext: any
          • userId: string

        Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • createNewRoleOrAddPermissions:function
      • createNewRoleOrAddPermissions(input: { permissions: string[]; role: string; userContext: any }): Promise<{ createdNewRole: boolean; status: "OK" }>
      • Parameters

        • input: { permissions: string[]; role: string; userContext: any }
          • permissions: string[]
          • role: string
          • userContext: any

        Returns Promise<{ createdNewRole: boolean; status: "OK" }>

    • deleteRole:function
      • deleteRole(input: { role: string; userContext: any }): Promise<{ didRoleExist: boolean; status: "OK" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ didRoleExist: boolean; status: "OK" }>

    • getAllRoles:function
      • getAllRoles(input: { userContext: any }): Promise<{ roles: string[]; status: "OK" }>
    • getPermissionsForRole:function
      • getPermissionsForRole(input: { role: string; userContext: any }): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • getRolesForUser:function
      • getRolesForUser(input: { userContext: any; userId: string }): Promise<{ roles: string[]; status: "OK" }>
      • Parameters

        • input: { userContext: any; userId: string }
          • userContext: any
          • userId: string

        Returns Promise<{ roles: string[]; status: "OK" }>

    • getRolesThatHavePermission:function
      • getRolesThatHavePermission(input: { permission: string; userContext: any }): Promise<{ roles: string[]; status: "OK" }>
      • Parameters

        • input: { permission: string; userContext: any }
          • permission: string
          • userContext: any

        Returns Promise<{ roles: string[]; status: "OK" }>

    • getUsersThatHaveRole:function
      • getUsersThatHaveRole(input: { role: string; userContext: any }): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>

    • removePermissionsFromRole:function
      • removePermissionsFromRole(input: { permissions: string[]; role: string; userContext: any }): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { permissions: string[]; role: string; userContext: any }
          • permissions: string[]
          • role: string
          • userContext: any

        Returns Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>

    • removeUserRole:function
      • removeUserRole(input: { role: string; userContext: any; userId: string }): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any; userId: string }
          • role: string
          • userContext: any
          • userId: string

        Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    Functions

    • addRoleToUser(userId: string, role: string, userContext?: any): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • userId: string
      • role: string
      • Optional userContext: any

      Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • createNewRoleOrAddPermissions(role: string, permissions: string[], userContext?: any): Promise<{ createdNewRole: boolean; status: "OK" }>
    • deleteRole(role: string, userContext?: any): Promise<{ didRoleExist: boolean; status: "OK" }>
    • getAllRoles(userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getPermissionsForRole(role: string, userContext?: any): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • role: string
      • Optional userContext: any

      Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • getRolesForUser(userId: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getRolesThatHavePermission(permission: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getUsersThatHaveRole(role: string, userContext?: any): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
    • init(config?: TypeInput): RecipeListFunction
    • removePermissionsFromRole(role: string, permissions: string[], userContext?: any): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
    • removeUserRole(userId: string, role: string, userContext?: any): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • userId: string
      • role: string
      • Optional userContext: any

      Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    Generated using TypeDoc

    \ No newline at end of file +recipe/userroles | supertokens-node
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    Module recipe/userroles

    Index

    Type aliases

    RecipeInterface: { addRoleToUser: any; createNewRoleOrAddPermissions: any; deleteRole: any; getAllRoles: any; getPermissionsForRole: any; getRolesForUser: any; getRolesThatHavePermission: any; getUsersThatHaveRole: any; removePermissionsFromRole: any; removeUserRole: any }

    Type declaration

    • addRoleToUser:function
      • addRoleToUser(input: { role: string; userContext: any; userId: string }): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any; userId: string }
          • role: string
          • userContext: any
          • userId: string

        Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • createNewRoleOrAddPermissions:function
      • createNewRoleOrAddPermissions(input: { permissions: string[]; role: string; userContext: any }): Promise<{ createdNewRole: boolean; status: "OK" }>
      • Parameters

        • input: { permissions: string[]; role: string; userContext: any }
          • permissions: string[]
          • role: string
          • userContext: any

        Returns Promise<{ createdNewRole: boolean; status: "OK" }>

    • deleteRole:function
      • deleteRole(input: { role: string; userContext: any }): Promise<{ didRoleExist: boolean; status: "OK" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ didRoleExist: boolean; status: "OK" }>

    • getAllRoles:function
      • getAllRoles(input: { userContext: any }): Promise<{ roles: string[]; status: "OK" }>
    • getPermissionsForRole:function
      • getPermissionsForRole(input: { role: string; userContext: any }): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • getRolesForUser:function
      • getRolesForUser(input: { userContext: any; userId: string }): Promise<{ roles: string[]; status: "OK" }>
      • Parameters

        • input: { userContext: any; userId: string }
          • userContext: any
          • userId: string

        Returns Promise<{ roles: string[]; status: "OK" }>

    • getRolesThatHavePermission:function
      • getRolesThatHavePermission(input: { permission: string; userContext: any }): Promise<{ roles: string[]; status: "OK" }>
      • Parameters

        • input: { permission: string; userContext: any }
          • permission: string
          • userContext: any

        Returns Promise<{ roles: string[]; status: "OK" }>

    • getUsersThatHaveRole:function
      • getUsersThatHaveRole(input: { role: string; userContext: any }): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any }
          • role: string
          • userContext: any

        Returns Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>

    • removePermissionsFromRole:function
      • removePermissionsFromRole(input: { permissions: string[]; role: string; userContext: any }): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { permissions: string[]; role: string; userContext: any }
          • permissions: string[]
          • role: string
          • userContext: any

        Returns Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>

    • removeUserRole:function
      • removeUserRole(input: { role: string; userContext: any; userId: string }): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
      • Parameters

        • input: { role: string; userContext: any; userId: string }
          • role: string
          • userContext: any
          • userId: string

        Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    Functions

    • addRoleToUser(userId: string, role: string, userContext?: any): Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • userId: string
      • role: string
      • Optional userContext: any

      Returns Promise<{ didUserAlreadyHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • createNewRoleOrAddPermissions(role: string, permissions: string[], userContext?: any): Promise<{ createdNewRole: boolean; status: "OK" }>
    • deleteRole(role: string, userContext?: any): Promise<{ didRoleExist: boolean; status: "OK" }>
    • getAllRoles(userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getPermissionsForRole(role: string, userContext?: any): Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • role: string
      • Optional userContext: any

      Returns Promise<{ permissions: string[]; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    • getRolesForUser(userId: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getRolesThatHavePermission(permission: string, userContext?: any): Promise<{ roles: string[]; status: "OK" }>
    • getUsersThatHaveRole(role: string, userContext?: any): Promise<{ status: "OK"; users: string[] } | { status: "UNKNOWN_ROLE_ERROR" }>
    • init(config?: TypeInput): RecipeListFunction
    • removePermissionsFromRole(role: string, permissions: string[], userContext?: any): Promise<{ status: "OK" | "UNKNOWN_ROLE_ERROR" }>
    • removeUserRole(userId: string, role: string, userContext?: any): Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>
    • Parameters

      • userId: string
      • role: string
      • Optional userContext: any

      Returns Promise<{ didUserHaveRole: boolean; status: "OK" } | { status: "UNKNOWN_ROLE_ERROR" }>

    Generated using TypeDoc

    \ No newline at end of file