@koex/passport-doreamon
Version:
koex passport-doreamon
23 lines (22 loc) • 735 B
TypeScript
import { Context } from '@koex/core';
import { Strategy, IVerify, Config } from '@koex/passport-oauth2-config';
export interface DoreamonStrategyOptions {
client_id: string;
client_secret: string;
redirect_uri: string;
}
export declare type IToken = {};
export declare type IProfile = {
id: string;
username: string;
nickname: string;
email: string;
avatar: string;
};
export declare class DoreamonStrategy extends Strategy<IToken, IProfile> {
private readonly _options;
readonly verify: IVerify<IProfile>;
constructor(_options: DoreamonStrategyOptions, verify: IVerify<IProfile>);
protected config: Config;
refreshToken(ctx: Context, refreshTokenString: string): Promise<IToken>;
}