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
import * as express from "express";
import * as passport from "passport";
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?: any): void;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/express, @types/passport
Credits
These definitions were written by Anton Lobashev.