node-socialite
Version:
Socialite is an OAuth2 authentication tool for Node.js
17 lines (16 loc) • 653 B
TypeScript
import { BaseProvider } from "../Core/BaseProvider";
import { User } from "../Core/User";
/**
* @see [授权机制说明](https://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E)
*/
export declare class Weibo extends BaseProvider {
static NAME: string;
protected _baseUrl: string;
protected _scopes: string[];
getAuthUrl(): string;
getTokenUrl(): string;
protected getTokenFields(code: string): Record<string, any>;
getUserByToken(token: string): Promise<Record<string, any>>;
protected getTokenPayload(token: string): Promise<string>;
mapUserToObject(user: Record<string, any>): User;
}