# @types/passport-google-oauth

> TypeScript definitions for passport-google-oauth

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

## Install

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

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

## Links

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

## Dependencies (2)

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

## Recent versions

- 1.0.45 (latest) — 2023-11-07
- 1.0.42 (ts3.6) — 2021-07-08
- 1.0.41 (ts2.3) — 2019-04-26
- 1.0.35 (ts2.2) — 2017-06-27
- 1.0.34 (ts2.0) — 2017-04-18
- 1.0.44 — 2023-10-18
- 1.0.43 — 2023-09-24
- 1.0.40 — 2019-04-11
- 1.0.39 — 2018-08-23
- 1.0.38 — 2018-04-03
- 1.0.37 — 2017-12-11
- 1.0.36 — 2017-10-25
- 1.0.33 — 2017-02-25
- 1.0.32 — 2016-09-19
- 1.0.31 — 2016-08-25
- … 12 more at https://npm.io/package/@types/passport-google-oauth/versions

## README

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

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

interface Profile extends passport.Profile {
    gender: string;
    _raw: string;
    _json: any;
}

interface IOAuthStrategyOption {
    consumerKey: string;
    consumerSecret: string;
    callbackURL: string;
    requestTokenURL?: string | undefined;
    accessTokenURL?: string | undefined;
    userAuthorizationURL?: string | undefined;
    sessionKey?: string | undefined;
}

interface VerifyOptions {
    message: string;
}

interface VerifyFunction {
    (error: any, user?: any, msg?: VerifyOptions): void;
}

declare class OAuthStrategy implements passport.Strategy {
    constructor(
        options: IOAuthStrategyOption,
        verify: (
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: VerifyFunction,
        ) => void,
    );
    name: string;
    authenticate(req: express.Request, options?: Object): void;
}

interface IOAuth2StrategyOption {
    clientID: string;
    clientSecret: string;
    callbackURL: string;
    authorizationURL?: string | undefined;
    tokenURL?: string | undefined;
    userProfileURL?: string | undefined;
    accessType?: string | undefined;
    approval_prompt?: string | undefined;
    prompt?: string | undefined;
    loginHint?: string | undefined;
    userID?: string | undefined;
    hostedDomain?: string | undefined;
    display?: string | undefined;
    requestVisibleActions?: string | undefined;
    openIDRealm?: string | undefined;
}

interface IOAuth2StrategyOptionWithRequest extends IOAuth2StrategyOption {
    passReqToCallback: boolean;
}

declare class OAuth2Strategy implements passport.Strategy {
    constructor(
        options: IOAuth2StrategyOption,
        verify: (
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: VerifyFunction,
        ) => void,
    );
    constructor(
        options: IOAuth2StrategyOptionWithRequest,
        verify: (
            req: express.Request,
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: VerifyFunction,
        ) => 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-google-oauth · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
