---
lang: en
title: 'API docs: authentication-passport.strategyadapter.authenticate'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-passport
permalink: /doc/en/lb4/apidocs.authentication-passport.strategyadapter.authenticate.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication-passport](./authentication-passport.md) &gt; [StrategyAdapter](./authentication-passport.strategyadapter.md) &gt; [authenticate](./authentication-passport.strategyadapter.authenticate.md)

## 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

<b>Signature:</b>

```typescript
authenticate(request: Request, options?: AuthenticateOptions): Promise<UserProfile | RedirectRoute>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  request | Request | The incoming request. |
|  options | AuthenticateOptions | Options passed through to strategy.authenticate. |

<b>Returns:</b>

Promise&lt;[UserProfile](./security.userprofile.md) \| [RedirectRoute](./rest.redirectroute.md)<!-- -->&gt;


