mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
oauth: bug fix
This commit is contained in:
1 parent
59739e3d86
commit
363db57ec4
2 files changed
+2
-2
No files matched your search
@@ -49,7 +49,7 @@ async function callback({ state, code }) {
|
||||
);
|
||||
}
|
||||
const t = res.body.access_token;
|
||||
const userInfo = await superagent.get(`${`${endpoint}/api` || 'https://api.github.com'}/user`)
|
||||
const userInfo = await superagent.get(`${endpoint ? `${endpoint}/api` : 'https://api.github.com'}/user`)
|
||||
.set('User-Agent', 'Hydro-OAuth')
|
||||
.set('Accept', 'application/vnd.github.v3+json')
|
||||
.set('Authorization', `token ${t}`);
|
||||
|
||||
Reference in new issue
Block a user