gitlab-acebase
Version:
AceBase realtime database server (webserver endpoint to allow remote connections)
36 lines • 1.43 kB
TypeScript
import { IOAuth2ProviderSettings, IOpenIDConfiguration, IOAuth2AuthCodeParams, IOAuth2RefreshTokenParams, OAuth2ProviderInitInfo, OAuth2Provider } from './oauth-provider';
export interface IGithubAuthSettings extends IOAuth2ProviderSettings {
/** 'openid', 'email', 'profile' and additional scopes you want to access. */
scopes?: string[];
state: string;
}
interface IGithubAuthToken {
access_token: string;
scope: string;
token_type: string;
}
export declare class GithubAuthProvider extends OAuth2Provider {
_config: IOpenIDConfiguration;
constructor(settings: IGithubAuthSettings);
/**
* Starts auth flow by getting the url the user should be redirected to
* @param info.redirectUrl Url spotify will redirect to after authorizing, should be the url
* @param info.state Optional state that will be passed to redirectUri by spotify
*/
init(info: OAuth2ProviderInitInfo): Promise<string>;
getAccessToken(params: IOAuth2AuthCodeParams | IOAuth2RefreshTokenParams): Promise<IGithubAuthToken>;
getUserInfo(access_token: string): Promise<{
id: string;
name: string;
display_name: string;
picture: {
url: string;
}[];
email: string;
email_verified: boolean;
other: {};
}>;
}
export declare const AuthProvider: typeof GithubAuthProvider;
export {};
//# sourceMappingURL=github.d.ts.map