1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-02-09 04:03:49 +02:00

[#207] use read-only scopes for the GitHub OAuth2 provider

This commit is contained in:
Takeshi Sato 2022-07-25 00:04:53 +09:00 committed by GitHub
parent 7926501649
commit 88d8cec3d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ type Github struct {
// NewGithubProvider creates new Github provider instance with some defaults.
func NewGithubProvider() *Github {
return &Github{&baseProvider{
scopes: []string{"user"},
scopes: []string{"read:user", "user:email"},
authUrl: "https://github.com/login/oauth/authorize",
tokenUrl: "https://github.com/login/oauth/access_token",
userApiUrl: "https://api.github.com/user",