Problem/Motivation
Currently the default scopes requested are user and user:email, which issues a token with write access to the user's account. This is likely a historical curio as I imagine these scopes were required at some point to get the necessary user data for authentication. Now, however, read:user is available and presents the user a much less scary (and more appropriate for social auth) approval page.
Steps to reproduce
n/a
Proposed resolution
Change default scope to read:user, and provide an upgrade path with note for existing sites so as to not break current integrations depending on the existing scopes.
Remaining tasks
Maintainer review.
User interface changes
API changes
Data model changes
Default scopes changed with upgrade path.
Issue fork social_auth_github-3220640
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bradjones1Comment #4
bradjones1Reference:
https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-fo...
Comment #5
wellsThe email is required (sort of?) for user authentication -- see GitHubAuthController.php#L87. It's unclear to me from the documentation -- does this scope still provide access to the email?
Comment #6
bradjones1> It's unclear to me from the documentation -- does this scope still provide access to the email?
It is a bit unclear - let me double-check this.
Comment #7
bradjones1So the answer here is yes, it does include email... but that begs the question, do we even need the broader scope or just the email?
Below is an example of the response for my account with the user:email scope, and it's more than sufficient for social auth because it includes other public info:
Comment #9
wellsMerged! Thanks for your efforts reaching this and creating the MR.