AbstractThe type of session data that will be returned after authentication
The type of parameters that the callback will receive from the strategy
Creates a new Strategy instance.
A function that validates the credentials and returns a user or throws an error if authentication fails
AbstractauthenticateThe core authentication method that each strategy must implement.
This method handles the specific authentication flow for the strategy. It extracts the necessary information from the request, validates it, and calls the callback function to authenticate the user.
The incoming request to authenticate
A promise that resolves to the authenticated user data
The Strategy class is the abstract base class that all authentication strategies must extend.
Strategies implement the specific authentication logic for different authentication methods (e.g., form-based, OAuth, etc.) and are registered with an Authenticator instance.
Example