1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-12-03 17:54:16 +02:00

updated the oauth2 providers to use the existing oauth2 endpoints and removed the email from spotify

This commit is contained in:
Gani Georgiev
2022-11-13 13:25:14 +02:00
parent bac5d76725
commit c95e50c8a5
3 changed files with 17 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ import (
"strconv"
"golang.org/x/oauth2"
"golang.org/x/oauth2/github"
)
var _ Provider = (*Github)(nil)
@@ -22,8 +23,8 @@ type Github struct {
func NewGithubProvider() *Github {
return &Github{&baseProvider{
scopes: []string{"read:user", "user:email"},
authUrl: "https://github.com/login/oauth/authorize",
tokenUrl: "https://github.com/login/oauth/access_token",
authUrl: github.Endpoint.AuthURL,
tokenUrl: github.Endpoint.TokenURL,
userApiUrl: "https://api.github.com/user",
}}
}