github-auth-library
Version:
A Node.js SDK for GitHub OAuth and User APIs
18 lines (13 loc) • 426 B
JavaScript
const GitHubOAuthService = require("./GitHubOAuthService");
class GithubAuthLibrary {
constructor(clientId, clientSecret) {
this.oauthService = new GitHubOAuthService(clientId, clientSecret);
}
async getToken(code, redirectUri) {
return this.oauthService.getToken(code, redirectUri);
}
async getUserInfo(token) {
return this.oauthService.getUserInfo(token);
}
}
module.exports = GithubAuthLibrary;