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
+3 -2
View File
@@ -2,6 +2,7 @@ package auth
import (
"golang.org/x/oauth2"
"golang.org/x/oauth2/facebook"
)
var _ Provider = (*Facebook)(nil)
@@ -18,8 +19,8 @@ type Facebook struct {
func NewFacebookProvider() *Facebook {
return &Facebook{&baseProvider{
scopes: []string{"email"},
authUrl: "https://www.facebook.com/dialog/oauth",
tokenUrl: "https://graph.facebook.com/oauth/access_token",
authUrl: facebook.Endpoint.AuthURL,
tokenUrl: facebook.Endpoint.TokenURL,
userApiUrl: "https://graph.facebook.com/me?fields=name,email,picture.type(large)",
}}
}