# @types/passport-bnet

> TypeScript definitions for passport-bnet

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

## Install

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

## Health

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

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2023-11-07 |
| First published | 2018-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 2.0.5 (latest) — 2023-11-07
- 2.0.2 (ts3.6) — 2021-07-08
- 2.0.1 (ts2.3) — 2018-12-10
- 2.0.4 — 2023-10-18
- 2.0.3 — 2023-09-24
- 2.0.0 — 2018-12-04

## README

# Installation
> `npm install --save @types/passport-bnet`

# Summary
This package contains type definitions for passport-bnet (https://github.com/Blizzard/passport-bnet#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-bnet.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-bnet/index.d.ts)
````ts
import {
    _StrategyOptionsBase,
    Strategy as OAuth2Strategy,
    VerifyFunction,
    VerifyFunctionWithRequest,
} from "passport-oauth2";

declare class BnetStrategy extends OAuth2Strategy {
    constructor(options: BnetStrategy.StrategyOptions, verify: VerifyFunction);
    constructor(options: BnetStrategy.StrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);
}

declare namespace BnetStrategy {
    // passport--bnet accepts any options that passport-oauth2 accepts, but add the option region and makes authorizationURL and tokenURL optional
    interface _BaseBnetOptions extends Partial<_StrategyOptionsBase> {
        clientID: string;
        clientSecret: string;

        region?: string | undefined;
    }

    interface StrategyOptions extends _BaseBnetOptions {
        passReqToCallback?: false | undefined;
    }

    interface StrategyOptionsWithRequest extends _BaseBnetOptions {
        passReqToCallback: true;
    }

    function getHost(region: string): string;

    type Strategy = BnetStrategy;
    const Strategy: typeof BnetStrategy;
}

export = BnetStrategy;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/passport-oauth2](https://npmjs.com/package/@types/passport-oauth2)

# Credits
These definitions were written by [Ivan Fernandes](https://github.com/ivan94).

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