;(async () => {
try {
const url =
'https://iuukai-proxy.vercel.app/proxy?url=https://github.com/login/oauth/access_token'
const params = {
// 回调获取
code,
// 你的 oauth 应用 ID
client_id,
// 你的 oauth 应用 Secret
client_secret
}
const config = {
headers: {
Accept: 'application/json'
}
}
const { data } = await axios.post(url, params, config)
// 成功获取 access_token
const accessToken = data['access_token']
console.log(accessToken)
} catch (err) {
console.log(err)
}
})()
iuukai / proxy Goto Github PK
View Code? Open in Web Editor NEWHome Page: proxy-iuukai.vercel.app