UNPKG

@koex/passport-github-config

Version:
33 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GithubStrategy = void 0; const passport_oauth2_config_1 = require("@koex/passport-oauth2-config"); class GithubStrategy extends passport_oauth2_config_1.Strategy { constructor(_options, verify) { super({ ..._options, response_type: 'code', grant_type: 'authorization_code', authorize_url: 'https://github.com/login/oauth/authorize', token_url: 'https://github.com/login/oauth/access_token', user_profile_url: 'https://api.github.com/user', }, verify); this._options = _options; this.verify = verify; this.config = { callback: { user_profile: { profile: { id: '{id}', login: '{login}', avatar_url: '{avatar_url}', url: '{url}', node_id: '{node_id}', }, }, }, }; } } exports.GithubStrategy = GithubStrategy; //# sourceMappingURL=strategy.js.map