# @types/passport-facebook

> TypeScript definitions for passport-facebook

Latest version **3.0.4** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 65/100 (B)** — status: stable.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2025-10-24 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51451 |
| Maintainers | types |

## Links

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

## Dependencies (3)

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

## Recent versions

- 3.0.4 (latest) — 2025-10-24
- 3.0.3 (ts4.5) — 2023-11-07
- 3.0.0 (ts4.3) — 2023-07-24
- 2.1.11 (ts4.1) — 2021-07-08
- 2.1.10 (ts3.4) — 2020-05-13
- 2.1.9 (ts2.4) — 2019-04-11
- 2.1.6 (ts2.2) — 2017-09-09
- 2.1.4 (ts2.0) — 2017-04-18
- 3.0.2 — 2023-10-18
- 3.0.1 — 2023-09-24
- 2.1.8 — 2018-04-03
- 2.1.7 — 2017-10-25
- 2.1.5 — 2017-06-27
- 2.1.3 — 2017-03-07
- 2.1.2 — 2017-02-13
- … 13 more at https://npm.io/package/@types/passport-facebook/versions

## README

# Installation
> `npm install --save @types/passport-facebook`

# Summary
This package contains type definitions for passport-facebook (https://github.com/jaredhanson/passport-facebook).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-facebook.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-facebook/index.d.ts)
````ts
import express = require("express");
import { OutgoingHttpHeaders } from "http";
import * as passport from "passport";
import oauth2 = require("passport-oauth2");

export interface Profile extends passport.Profile {
    id: string;
    displayName: string;
    gender?: string | undefined;
    ageRange?:
        | {
            min: number;
            max?: number | undefined;
        }
        | undefined;
    profileUrl?: string | undefined;
    username?: string | undefined;
    birthday: string;

    _raw: string;
    _json: any;
}

export interface AuthenticateOptions extends passport.AuthenticateOptions {
    authType?: string | undefined;
}

export interface StrategyOptions {
    passReqToCallback?: false | undefined;
    clientID: string;
    clientSecret: string;
    callbackURL: string;

    customHeaders?: OutgoingHttpHeaders | undefined;
    scope?: string | string[] | undefined;
    scopeSeparator?: string | undefined;
    sessionKey?: string | undefined;
    store?: oauth2.StateStore | undefined;
    state?: any;
    skipUserProfile?: any;
    pkce?: boolean | undefined;
    proxy?: any;
    enableProof?: boolean | undefined;
    profileFields?: string[] | undefined;

    authorizationURL?: string | undefined;
    tokenURL?: string | undefined;
    profileURL?: string | undefined;
    graphAPIVersion?: string | undefined;
}

export interface AuthorizationParamsOptions {
    display?: "page" | "popup" | "touch" | undefined;
    authType?: "reauthenticate" | undefined;
    authNonce?: string | undefined;
}

export interface StrategyOptionsWithRequest extends Omit<StrategyOptions, "passReqToCallback"> {
    passReqToCallback: true;
}

export type VerifyFunction = (
    accessToken: string,
    refreshToken: string,
    profile: Profile,
    done: (error: any, user?: any, info?: any) => void,
) => void;

export type VerifyFunctionWithRequest = (
    req: express.Request,
    accessToken: string,
    refreshToken: string,
    profile: Profile,
    done: (error: any, user?: any, info?: any) => void,
) => void;

export class Strategy extends oauth2.Strategy {
    constructor(options: StrategyOptions, verify: VerifyFunction);
    constructor(options: StrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);

    name: string;
    authenticate(req: express.Request, options?: object): void;
    authorizationParams(options: AuthorizationParamsOptions): object;
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport), [@types/passport-oauth2](https://npmjs.com/package/@types/passport-oauth2)

# Credits
These definitions were written by [James Roland Cabresos](https://github.com/staticfunction), and [Lucas Acosta](https://github.com/lucasmacosta).

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