
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@types/passport-local
Advanced tools
TypeScript definitions for passport-local
npm install --save @types/passport-local
This package contains type definitions for passport-local (https://github.com/jaredhanson/passport-local).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-local.
/// <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;
}
These definitions were written by Maxime LUCE.
@types/passport provides TypeScript type definitions for the core Passport.js library. It is essential for adding type safety to your Passport.js authentication strategies and middleware.
@types/passport-jwt provides TypeScript type definitions for the passport-jwt strategy, which is used for authenticating with JSON Web Tokens (JWT). It is useful for applications that use token-based authentication instead of session-based.
@types/passport-google-oauth20 provides TypeScript type definitions for the passport-google-oauth20 strategy, which is used for authenticating with Google OAuth 2.0. It is useful for applications that want to allow users to log in using their Google accounts.
FAQs
TypeScript definitions for passport-local
The npm package @types/passport-local receives a total of 850,466 weekly downloads. As such, @types/passport-local popularity was classified as popular.
We found that @types/passport-local demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.