Page Contents

Home > @loopback/authentication-passport > StrategyAdapter > authenticate

StrategyAdapter.authenticate() method

The function to invoke the contained passport strategy. 1. Create an instance of the strategy 2. add success and failure state handlers 3. authenticate using the strategy

Signature:

authenticate(request: Request, options?: AuthenticateOptions): Promise<UserProfile | RedirectRoute>;

Parameters

Parameter Type Description
request Request The incoming request.
options AuthenticateOptions (Optional) Options passed through to strategy.authenticate.

Returns:

Promise<UserProfile | RedirectRoute>