You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@types/passport-google-oauth2

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/passport-google-oauth2

TypeScript definitions for passport-google-oauth2

0.1.10
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npmnpm
Version published
Maintainers
0
Created
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, 27 Aug 2024 18:38:32 GMT
  • Dependencies: @types/express

Credits

These definitions were written by .

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

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