3.0.3 • Published 6 months ago

@types/passport-facebook v3.0.3

Weekly downloads
16,730
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/passport-facebook

Summary

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

Details

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

index.d.ts

// Type definitions for passport-facebook 2.1
// Project: https://github.com/jaredhanson/passport-facebook
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>, Lucas Acosta <https://github.com/lucasmacosta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

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

export interface Profile extends passport.Profile {
    id: string;
    displayName: string;
    gender?: string | undefined;
    ageRange?: {
        min: number;
        max?: number | undefined;
    } | undefined;
    profileUrl?: string | undefined;
    username?: string | undefined;
    birthday: string;

    _raw: string;
    _json: any;
}

export interface AuthenticateOptions extends passport.AuthenticateOptions {
    authType?: string | undefined;
}

export interface StrategyOption {
    clientID: string;
    clientSecret: string;
    callbackURL: string;

    scopeSeparator?: string | undefined;
    enableProof?: boolean | undefined;
    profileFields?: string[] | undefined;

    authorizationURL?: string | undefined;
    tokenURL?: string | undefined;
    profileURL?: string | undefined;
    graphAPIVersion?: string | undefined;

    display?: 'page' | 'popup' | 'touch' | undefined;

    authType?: 'reauthenticate' | undefined;
    authNonce?: string | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOption {
    passReqToCallback: true;
}

export type VerifyFunction =
    (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void;

export type VerifyFunctionWithRequest =
    (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void;

export class Strategy implements passport.Strategy {
    constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest);
    constructor(options: StrategyOption, verify: VerifyFunction);

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

Additional Details

Credits

These definitions were written by James Roland Cabresos, and Lucas Acosta.

3.0.3

6 months ago

3.0.2

7 months ago

3.0.1

8 months ago

3.0.0

10 months ago

2.1.11

3 years ago

2.1.10

4 years ago

2.1.9

5 years ago

2.1.8

6 years ago

2.1.7

7 years ago

2.1.6

7 years ago

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

1.0.29

8 years ago

1.0.28

8 years ago

1.0.27-alpha

8 years ago

1.0.26-alpha

8 years ago

1.0.25-alpha

8 years ago

1.0.24-alpha

8 years ago

1.0.23-alpha

8 years ago

1.0.22-alpha

8 years ago

1.0.21-alpha

8 years ago

1.0.16-alpha

8 years ago

1.0.15-alpha

8 years ago