supertokens-node
    Preparing search index...

    Variable generateRecoverAccountToken

    generateRecoverAccountToken: (
        input: {
            email: string;
            tenantId: string;
            userContext?: Record<string, any>;
            userId: string;
        },
    ) => Promise<
        | GenerateRecoverAccountTokenErrorResponse
        | { status: "OK"; token: string },
    > = Wrapper.generateRecoverAccountToken

    Type declaration

      • (
            input: {
                email: string;
                tenantId: string;
                userContext?: Record<string, any>;
                userId: string;
            },
        ): Promise<
            | GenerateRecoverAccountTokenErrorResponse
            | { status: "OK"; token: string },
        >
      • We do not make email optional here because we want to allow passing in primaryUserId. If we make email optional, and if the user provides a primaryUserId, then it may result in two problems:

        • there is no recipeUserId = input primaryUserId, in this case, this function will throw an error
        • There is a recipe userId = input primaryUserId, but that recipe has no email, or has wrong email compared to what the user wanted to generate a reset token for.

        And we want to allow primaryUserId being passed in.

        Parameters

        • input: {
              email: string;
              tenantId: string;
              userContext?: Record<string, any>;
              userId: string;
          }

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