# @types/passport-twitter

> TypeScript definitions for passport-twitter

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

## Install

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

## 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.40 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.0.40 (latest) — 2023-11-07
- 1.0.37 (ts3.6) — 2021-07-08
- 1.0.36 (ts3.0) — 2020-07-06
- 1.0.35 (ts2.9) — 2020-05-13
- 1.0.34 (ts2.3) — 2018-04-03
- 1.0.32 (ts2.2) — 2017-06-27
- 1.0.31 (ts2.0) — 2017-04-18
- 1.0.39 — 2023-10-18
- 1.0.38 — 2023-09-24
- 1.0.33 — 2017-10-25
- 1.0.30 — 2016-12-08
- 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
- … 7 more at https://npm.io/package/@types/passport-twitter/versions

## README

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

import passport = require("passport");
import express = require("express");

interface Profile extends passport.Profile {
    gender: string;
    username: string;

    _raw: string;
    _json: any;
    _accessLevel: string;
}

interface IStrategyOptionBase {
    consumerKey: string;
    consumerSecret: string;
    callbackURL: string;

    includeEmail?: boolean | undefined;
    includeStatus?: boolean | undefined;
    includeEntities?: boolean | undefined;

    requestTokenURL?: string | undefined;
    accessTokenURL?: string | undefined;
    userAuthorizationURL?: string | undefined;
    sessionKey?: string | undefined;

    forceLogin?: boolean | undefined;
    screenName?: string | undefined;

    userProfileURL?: string | undefined;
    skipExtendedUserProfile?: boolean | undefined;
}

interface IStrategyOption extends IStrategyOptionBase {
    passReqToCallback?: false | undefined;
}

interface IStrategyOptionWithRequest extends IStrategyOptionBase {
    passReqToCallback: true;
}

declare class Strategy extends passport.Strategy {
    constructor(
        options: IStrategyOption,
        verify: (
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: (error: any, user?: any) => void,
        ) => void,
    );
    constructor(
        options: IStrategyOptionWithRequest,
        verify: (
            req: express.Request,
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: (error: any, user?: any) => void,
        ) => void,
    );

    name: string;
    authenticate(req: express.Request, options?: Object): void;
}

````

### 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)

# Credits
These definitions were written by [James Roland Cabresos](https://github.com/staticfunction).

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