Skip to content

Commit

Permalink
feat(provider): use more restrictive default scope for GitHub (nextau…
Browse files Browse the repository at this point in the history
…thjs#2579)

When using the default settings of the Github provider, with the "user" scope, it grants read/write access to profile info only. By changing to "read:user" and "user:email" it will only request read-only access https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps

BREAKING CHANGE:

By default, the GitHub Provider scope won't ask for full write access to user profiles. If you need that, you will now have to add the `user` scope to your configuration.
  • Loading branch information
nathanclevenger authored Aug 21, 2021
1 parent e06ced5 commit e15bf9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default function GitHub(options) {
id: "github",
name: "GitHub",
type: "oauth",
authorization: "https://github.com/login/oauth/authorize?scope=user",
authorization: "https://github.com/login/oauth/authorize?scope=read:user+user:email",
token: "https://github.com/login/oauth/access_token",
userinfo: "https://api.github.com/user",
profile(profile) {
Expand Down

0 comments on commit e15bf9b

Please sign in to comment.