node-socialite
Version:
Socialite is an OAuth2 authentication tool for Node.js
19 lines (18 loc) • 688 B
TypeScript
import { BaseProvider } from "../Core/BaseProvider";
import { User } from "../Core/User";
/**
* @see [授权 OAuth 应用程序](https://docs.github.com/cn/developers/apps/building-oauth-apps/authorizing-oauth-apps)
*/
export declare class Github extends BaseProvider {
static NAME: string;
protected _scopes: string[];
getAuthUrl(): string;
getTokenUrl(): string;
getUserByToken(token: string): Promise<Record<string, any>>;
mapUserToObject(user: Record<string, any>): User;
protected createAuthorizationHeaders(token: string): {
Accept: string;
Authorization: string;
};
protected getEmailByToken(token: string): Promise<string>;
}