# @types/passport-auth0

> TypeScript definitions for passport-auth0

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

## Install

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

## 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.9 |
| Published | 2023-11-07 |
| First published | 2018-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.0.9 (latest) — 2023-11-07
- 1.0.5 (ts3.6) — 2021-07-08
- 1.0.4 (ts2.8) — 2020-02-18
- 1.0.2 (ts2.3) — 2018-11-15
- 1.0.8 — 2023-10-18
- 1.0.7 — 2023-09-24
- 1.0.6 — 2023-09-22
- 1.0.3 — 2020-02-18
- 1.0.1 — 2018-10-04
- 1.0.0 — 2018-10-03

## README

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

declare class StrategyInternal extends passport.Strategy {
    constructor(
        options: StrategyInternal.StrategyOptionWithRequest,
        verify: StrategyInternal.VerifyFunctionWithRequest,
    );
    constructor(options: StrategyInternal.StrategyOption, verify: StrategyInternal.VerifyFunction);

    name: string;
    authenticate(req: express.Request, options?: object): void;
}

declare namespace StrategyInternal {
    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;
    }

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

    interface StrategyOption {
        clientID: string;
        clientSecret: string;
        callbackURL: string;
        domain: string;
        scopeSeparator?: string | undefined;
        enableProof?: boolean | undefined;
        profileFields?: string[] | undefined;
        state?: boolean | undefined;
    }

    interface StrategyOptionWithRequest extends StrategyOption {
        passReqToCallback: true;
    }
    interface ExtraVerificationParams {
        audience?: string | undefined;
        connection?: string | undefined;
        prompt?: string | undefined;
    }

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

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

    // NOTE: not true for `export import` statements
    // eslint-disable-next-line @definitelytyped/strict-export-declare-modifiers
    export import Strategy = StrategyInternal;
}

export = StrategyInternal;

````

### 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 [John Umeh](https://github.com/johnbendi), [Vishnu Sankar](https://github.com/iamvishnusankar), [Duncan Hall](https://github.com/duncanhall), and [Karl Horky](https://github.com/karlhorky).

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