mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17: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}`);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/login-with-github",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"main": "package.json",
|
||||
"repository": "git@github.com:hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
|
||||
Reference in new issue
Block a user