Skip to content

Commit 8fccf48

Browse files
authored
reduce oauth permission scopes
Signed-off-by: Kaxada <[email protected]>
1 parent 247e247 commit 8fccf48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

providers/github/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ const githubAuth = (req, res) => {
3333
}
3434

3535
if (type === "event-badging") {
36-
const scopes = ["repo"];
36+
const scopes = ["public_repo"];
3737
const encryptedFormData = encrypt(JSON.stringify(req.body));
3838
const url = `https://github.com/login/oauth/authorize?client_id=${
3939
process.env.GITHUB_AUTH_CLIENT_ID
4040
}&scope=${scopes.join(",")}&state=${encryptedFormData}`;
4141

4242
res.send({ authorizationLink: url });
4343
} else {
44-
const scopes = ["user", "repo"];
44+
const scopes = ["user", "public_repo"];
4545
const url = `https://github.com/login/oauth/authorize?client_id=${
4646
process.env.GITHUB_AUTH_CLIENT_ID
4747
}&scope=${scopes.join(",")}`;

0 commit comments

Comments
 (0)