Socket
Socket
Sign inDemoInstall

@types/passport-google-oauth2

Package Overview
Dependencies
12
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/passport-google-oauth2

TypeScript definitions for passport-google-oauth2


Version published
Weekly downloads
29K
decreased by-13.69%
Maintainers
1
Install size
2.12 MB
Created
Weekly downloads
 

Readme

Source

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

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, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Elliot Blackburn, and Mike Francis.

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc