1.3.5 • Published 6 months ago
@types/passport-vkontakte v1.3.5
Installation
npm install --save @types/passport-vkontakte
Summary
This package contains type definitions for passport-vkontakte (https://github.com/stevebest/passport-vkontakte#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-vkontakte.
index.d.ts
// Type definitions for passport-vkontakte 1.3
// Project: https://github.com/stevebest/passport-vkontakte#readme
// Definitions by: Anton Lobashev <https://github.com/soulthreads>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as passport from 'passport';
import * as express from 'express';
export interface Profile extends passport.Profile {
gender?: string | undefined;
profileUrl?: string | undefined;
_raw: string;
_json: any;
}
export interface StrategyOptions {
clientID: string;
clientSecret: string;
callbackURL: string;
profileFields?: string[] | undefined;
apiVersion?: string | undefined;
lang?: string | undefined;
}
export type VerifyCallback = (error: any, user?: any, info?: any) => void;
export interface Params {
accessToken: string;
email?: string | undefined;
expires_in: number;
user_id: number;
}
export type VerifyFunctionWithParams = (
accessToken: string,
refreshToken: string,
params: Params,
profile: Profile,
done: VerifyCallback
) => void;
export type VerifyFunction = (
accessToken: string,
refreshToken: string,
profile: Profile,
done: VerifyCallback
) => void;
export class Strategy implements passport.Strategy {
constructor(
options: StrategyOptions,
verify: VerifyFunctionWithParams | VerifyFunction
);
name: string;
authenticate: (req: express.Request, options?: object) => void;
}
Additional Details
- Last updated: Thu, 08 Jul 2021 20:19:27 GMT
- Dependencies: @types/passport, @types/express
- Global values: none
Credits
These definitions were written by Anton Lobashev.