mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fixed github user info api
This commit is contained in:
parent
af89dc7321
commit
337f8b08e6
@ -32,7 +32,8 @@ export class GithubProvider extends OAuthBaseProvider {
|
||||
async postProcessUserInfo(tokenSet: TokenSet): Promise<OAuthUserInfo> {
|
||||
const rawUserInfoRes = await fetch("https://api.github.com/user", {
|
||||
headers: {
|
||||
Authorization: `token ${tokenSet.accessToken}`,
|
||||
Authorization: `Bearer ${tokenSet.accessToken}`,
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
},
|
||||
});
|
||||
if (!rawUserInfoRes.ok) {
|
||||
@ -47,7 +48,8 @@ export class GithubProvider extends OAuthBaseProvider {
|
||||
|
||||
const emailsRes = await fetch("https://api.github.com/user/emails", {
|
||||
headers: {
|
||||
Authorization: `token ${tokenSet.accessToken}`,
|
||||
Authorization: `Bearer ${tokenSet.accessToken}`,
|
||||
"X-GitHub-Api-Version": "2022-11-28",
|
||||
},
|
||||
});
|
||||
if (!emailsRes.ok) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user