# @types/passport-google-oauth2

> TypeScript definitions for passport-google-oauth2

Latest version **0.1.10** (published 2024-08-27) · MIT license · 0 weekly downloads

## Install

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

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2024-08-27 |
| First published | 2017-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51436 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.1.10 (latest) — 2024-08-27
- 0.1.8 (ts4.5) — 2023-11-07
- 0.1.5 (ts4.0) — 2022-03-29
- 0.1.4 (ts3.8) — 2021-07-08
- 0.1.3 (ts2.5) — 2019-10-23
- 0.1.9 — 2024-08-23
- 0.1.7 — 2023-10-18
- 0.1.6 — 2023-09-24
- 0.1.2 — 2018-04-09
- 0.1.1 — 2017-07-25
- 0.1.0 — 2017-07-07

## README

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

export interface StrategyOptions {
    clientID: string;
    clientSecret: string;
    callbackURL: string;
    passReqToCallback?: true | undefined;
    scope?: string[] | string | undefined;
    proxy?: boolean | undefined;
}

export interface StrategyOptionsWithRequest {
    clientID: string;
    clientSecret: string;
    callbackURL: string;
    passReqToCallback: true;
    scope?: string[] | string | undefined;
}

export interface VerifyOptions {
    message: string;
}

export type VerifyCallback = (error: any, user?: any, options?: VerifyOptions) => void;

export type VerifyFunctionWithRequestAndParams = (
    req: Request,
    accessToken: string,
    refreshToken: string,
    params: {
        access_token: string;
        expires_in: number;
        scope: string;
        token_type: "Bearer";
        id_token: string;
    },
    profile: any,
    done: VerifyCallback,
) => void;

export type VerifyFunctionWithRequest = (
    req: Request,
    accessToken: string,
    refreshToken: string,
    profile: any,
    done: VerifyCallback,
) => void;

export type VerifyFunction = (accessToken: string, refreshToken: string, profile: any, done: VerifyCallback) => void;

export class Strategy implements Strategy {
    name: string;
    authenticate: (req: Request, options?: object) => void;

    constructor(
        options: StrategyOptionsWithRequest,
        verify: VerifyFunctionWithRequest | VerifyFunctionWithRequestAndParams,
    );
    constructor(options: StrategyOptions, verify: VerifyFunction);
    constructor(verify: VerifyFunction);
}

````

### Additional Details
 * Last updated: Tue, 27 Aug 2024 18:38:32 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express)

# Credits
These definitions were written by .

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