Class Strategy<User, VerifyOptions>Abstract

The Strategy class is the base class every strategy should extend.

This class receives two generics, a User and a VerifyParams.

  • User is the type of the user data.
  • VerifyParams is the type of the params the verify callback will receive from the strategy.

Type Parameters

  • User
  • VerifyOptions

Constructors

Properties

Methods

Constructors

Properties

name: string

The name of the strategy. This will be used by the Authenticator to identify and retrieve the strategy.

Methods

  • The authentication flow of the strategy.

    This method receives the Request from the authenticator we want to authenticate.

    At the end of the flow, it will return a the User data to be used by the application.

    Parameters

    Returns Promise<User>