# @types/passport-local

> TypeScript definitions for passport-local

Latest version **1.0.38** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/passport-local
pnpm add @types/passport-local
yarn add @types/passport-local
bun add @types/passport-local
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.38 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/passport-local
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local
- npm.io page: https://npm.io/package/@types/passport-local

## Dependencies (3)

- [@types/express](https://npm.io/package/@types/express.md) *
- [@types/passport](https://npm.io/package/@types/passport.md) *
- [@types/passport-strategy](https://npm.io/package/@types/passport-strategy.md) *

## Recent versions

- 1.0.38 (latest) — 2023-11-07
- 1.0.35 (ts4.2) — 2023-01-07
- 1.0.34 (ts3.6) — 2021-07-07
- 1.0.33 (ts2.3) — 2018-04-03
- 1.0.31 (ts2.0) — 2017-09-07
- 1.0.37 — 2023-10-18
- 1.0.36 — 2023-09-24
- 1.0.32 — 2017-10-25
- 1.0.30 — 2017-04-18
- 1.0.29 — 2016-09-19
- 1.0.28 — 2016-07-14
- 1.0.27-alpha — 2016-07-08
- 1.0.26-alpha — 2016-07-04
- 1.0.25-alpha — 2016-07-02
- 1.0.24-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/passport-local/versions

## README

# Installation
> `npm install --save @types/passport-local`

# Summary
This package contains type definitions for passport-local (https://github.com/jaredhanson/passport-local).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local/index.d.ts)
````ts
/// <reference types="passport"/>

import { Strategy as PassportStrategy } from "passport-strategy";
import express = require("express");

interface IStrategyOptions {
    usernameField?: string | undefined;
    passwordField?: string | undefined;
    session?: boolean | undefined;
    passReqToCallback?: false | undefined;
}

interface IStrategyOptionsWithRequest {
    usernameField?: string | undefined;
    passwordField?: string | undefined;
    session?: boolean | undefined;
    passReqToCallback: true;
}

interface IVerifyOptions {
    message: string;
}

interface VerifyFunctionWithRequest {
    (
        req: express.Request,
        username: string,
        password: string,
        done: (error: any, user?: Express.User | false, options?: IVerifyOptions) => void,
    ): void;
}

interface VerifyFunction {
    (
        username: string,
        password: string,
        done: (error: any, user?: Express.User | false, options?: IVerifyOptions) => void,
    ): void;
}

declare class Strategy extends PassportStrategy {
    constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);
    constructor(options: IStrategyOptions, verify: VerifyFunction);
    constructor(verify: VerifyFunction);

    name: string;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport), [@types/passport-strategy](https://npmjs.com/package/@types/passport-strategy)

# Credits
These definitions were written by [Maxime LUCE](https://github.com/SomaticIT).

---
_Source: https://npm.io/package/@types/passport-local · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
