Class FormStrategy<User>

Type Parameters

  • User

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

name: string = "form"
verify: StrategyVerifyCallback<User, FormStrategyVerifyParams>

Methods

  • Parameters

    • request: Request
    • sessionStorage: SessionStorage<SessionData, SessionData>
    • options: AuthenticateOptions

    Returns Promise<User>

  • Throw an AuthorizationError or a redirect to the failureRedirect.

    Parameters

    • message: string

      The error message to set in the session.

    • request: Request

      The request to get the cookie out of.

    • sessionStorage: SessionStorage<SessionData, SessionData>

      The session storage to retrieve the session from.

    • options: AuthenticateOptions

      The strategy options.

    • Optional cause: Error

    Returns Promise<never>

    Throws

    If the throwOnError is set to true.

    Throws

    If the failureRedirect is set or throwOnError is false.

  • Returns the user data or throw a redirect to the successRedirect.

    Parameters

    • user: User

      The user data to set in the session.

    • request: Request

      The request to get the cookie out of.

    • sessionStorage: SessionStorage<SessionData, SessionData>

      The session storage to retrieve the session from.

    • options: AuthenticateOptions

      The strategy options.

    Returns Promise<User>

    The user data.

    Throws

    If the successRedirect is set, it will redirect to it.