prose / gatekeeper

Enables client-side applications to dance OAuth with GitHub.
MIT License
760 stars 182 forks source link

Adding support for GitHub "scope" parameters #28

Open bnvk opened 7 years ago

bnvk commented 7 years ago

It would be helpful to specify in the config certain scopes that a user is granting access to. Use case:

Perhaps this filtering is already possible somehow I'm just unaware...

hobbitcode commented 7 years ago

It is possible!

In step #1 of OAuth Steps https://github.com/prose/gatekeeper#oauth-steps add query parameters like you do for client_id you just also add scope like... scope=user%20repo would give you user and repo scopes.

For example:

https://github.com/login/oauth/authorize?client_id=123abc456defg789hij&scope=repo%20user%20admin:org