import GithubOauthClient from 'github-oauth-ts'
const client = new GithubOauthClient({
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
redirectUri: 'YOUR_REDIRECT_URI',
})
Note that you must have the authCode beforehand. You're gonna usually have this code by your front-end application
const accessToken = await client.getAccessToken(authCode)
const userInfo = await client.getUserInfo(accessToken)