@types/passport-instagram
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Installation

npm install --save @types/passport-instagram

Summary

This package contains type definitions for passport-instagram (https://github.com/jaredhanson/passport-instagram).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-instagram.

index.d.ts

// TypeScript Version: 2.3

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

export interface Profile extends passport.Profile {
    id: string;
    displayName: string;
    name: { familyName: string; givenName: string };
    username: string;

    _raw: string;
    _json: any;
}

export interface StrategyOptionBase {
    clientID: string;
    clientSecret: string;
    callbackURL: string;
    tokenURL?: string | undefined;
    authorizationURL?: string | undefined;
}

export interface StrategyOption extends StrategyOptionBase {
    passReqToCallback?: false | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOptionBase {
    passReqToCallback: true;
}

export class Strategy extends passport.Strategy {
    constructor(
        options: StrategyOption,
        verify: (
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: (error: any, user?: any) => void,
        ) => void,
    );
    constructor(
        options: StrategyOptionWithRequest,
        verify: (
            req: express.Request,
            accessToken: string,
            refreshToken: string,
            profile: Profile,
            done: (error: any, user?: any) => void,
        ) => void,
    );

    name: string;
    authenticate(req: express.Request, options?: object): void;
}

Additional Details

Credits

These definitions were written by Sagar Jain.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-instagram

Weekly Downloads

1,607

Version

1.0.5

License

MIT

Unpacked Size

5.56 kB

Total Files

5

Last publish

Collaborators

  • types