Skip to content

Commit

Permalink
reduce oauth permission scopes
Browse files Browse the repository at this point in the history
Signed-off-by: Kaxada <[email protected]>
  • Loading branch information
kaxada authored Oct 11, 2024
1 parent 247e247 commit 8fccf48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/github/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ const githubAuth = (req, res) => {
}

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

res.send({ authorizationLink: url });
} else {
const scopes = ["user", "repo"];
const scopes = ["user", "public_repo"];
const url = `https://github.com/login/oauth/authorize?client_id=${
process.env.GITHUB_AUTH_CLIENT_ID
}&scope=${scopes.join(",")}`;
Expand Down

0 comments on commit 8fccf48

Please sign in to comment.