# @types/passport-steam

> TypeScript definitions for passport-steam

Latest version **1.0.6** (published 2024-08-22) · MIT license · 0 weekly downloads

## Install

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

## 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.6 |
| Published | 2024-08-22 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.0.6 (latest) — 2024-08-22
- 1.0.5 (ts4.6) — 2023-12-09
- 1.0.4 (ts4.5) — 2023-11-07
- 1.0.1 (ts3.9) — 2017-11-09
- 1.0.0 (ts2.2) — 2017-07-14
- 1.0.3 — 2023-10-18
- 1.0.2 — 2023-09-24

## README

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

declare class SteamStrategy<T extends SteamStrategy.SteamStrategyOptions> extends Passport.Strategy {
    constructor(options: T, validate: ValidateFn<T>);
}

declare namespace SteamStrategy {
    const Strategy: typeof SteamStrategy;
    const version: string;

    interface SteamStrategyOptions {
        returnURL: string;
        realm: string;
        apiKey: string;
        passReqToCallback?: boolean;
    }
}

type ValidateFn<T extends SteamStrategy.SteamStrategyOptions> = T["passReqToCallback"] extends true
    ? (req: Request, identifier: SteamIdentifier, profile: SteamProfile, done: DoneFn) => void
    : (identifier: SteamIdentifier, profile: SteamProfile, done: DoneFn) => void;

type DoneFn = (err: unknown, user?: Express.User | false | null) => void;

type SteamIdentifier = string;

interface SteamProfile {
    provider: "steam";
    _json: {
        steamid: string;
        communityvisibilitystate: number;
        profilestate: number;
        personaname: string;
        commentpermission: number;
        profileurl: string;
        avatar: string;
        avatarmedium: string;
        avatarfull: string;
        avatarhash: string;
        lastlogoff: number;
        personastate: number;
        realname: string;
        primaryclanid: string;
        timecreated: number;
        personastateflags: number;
        loccountrycode: string;
        locstatecode: string;
    };
    id: string;
    displayName: string;
    photos: Array<{ value: string }>;
}

export = SteamStrategy;

````

### Additional Details
 * Last updated: Thu, 22 Aug 2024 08:09:16 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport)

# Credits
These definitions were written by [Jonas D.](https://github.com/nordowl).

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