Installation
npm install --save @types/passport-weibo
Summary
This package contains type definitions for passport-weibo (https://github.com/xinbenlv/passport-weibo#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-weibo.
index.d.ts
import { Profile } from "passport";
import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2";
declare namespace PassportWeibo {
interface Options {
clientID: string;
clientSecret: string;
callbackURL: string;
authorizationURL?: string;
tokenURL?: string;
scopeSeparator?: string;
customHeaders?: Record<string, string>;
}
interface User extends Profile {
provider: "weibo";
id: string;
displayName: string;
_raw: object;
_json: object;
}
type UserProfileCallback = (err: Error | null, user: User) => void;
type VerifyFunction = (accessToken: string, refreshToken: string, profile: User, done: VerifyCallback) => void;
class Strategy extends OAuth2Strategy {
constructor(options: Options, verify: VerifyFunction);
userProfile(accessToken: string, done: UserProfileCallback): void;
}
}
export = PassportWeibo.Strategy;
Additional Details
- Last updated: Fri, 08 Dec 2023 02:18:14 GMT
- Dependencies: @types/passport, @types/passport-oauth2
Credits
These definitions were written by bangbang93.