diff options
author | techknowlogick <techknowlogick@gitea.io> | 2019-09-14 06:02:39 -0400 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-09-14 12:02:39 +0200 |
commit | 7a8e299c7c7b4f83b8280ab2b069ddaed9f34d0f (patch) | |
tree | 4faf85c56ea34c5dcbf59f09e3a76ba41194ce94 /modules/auth/oauth2 | |
parent | 107d57a9256cdfbbb4f59665ea08311e14eb59de (diff) | |
download | gitea-7a8e299c7c7b4f83b8280ab2b069ddaed9f34d0f.tar.gz gitea-7a8e299c7c7b4f83b8280ab2b069ddaed9f34d0f.zip |
migrate gplus to google oauth2 provider (#7885)
* migrate gplus to google oauth2 provider. this still provides support for old gplus connections.
* Update models/oauth2.go
Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>
* make vendor
Diffstat (limited to 'modules/auth/oauth2')
-rw-r--r-- | modules/auth/oauth2/oauth2.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/auth/oauth2/oauth2.go b/modules/auth/oauth2/oauth2.go index de2efd0463..242254e600 100644 --- a/modules/auth/oauth2/oauth2.go +++ b/modules/auth/oauth2/oauth2.go @@ -22,7 +22,7 @@ import ( "github.com/markbates/goth/providers/gitea" "github.com/markbates/goth/providers/github" "github.com/markbates/goth/providers/gitlab" - "github.com/markbates/goth/providers/gplus" + "github.com/markbates/goth/providers/google" "github.com/markbates/goth/providers/openidConnect" "github.com/markbates/goth/providers/twitter" "github.com/satori/go.uuid" @@ -166,8 +166,8 @@ func createProvider(providerName, providerType, clientID, clientSecret, openIDCo } } provider = gitlab.NewCustomisedURL(clientID, clientSecret, callbackURL, authURL, tokenURL, profileURL, "read_user") - case "gplus": - provider = gplus.New(clientID, clientSecret, callbackURL, "email") + case "gplus": // named gplus due to legacy gplus -> google migration (Google killed Google+). This ensures old connections still work + provider = google.New(clientID, clientSecret, callbackURL) case "openidConnect": if provider, err = openidConnect.New(clientID, clientSecret, callbackURL, openIDConnectAutoDiscoveryURL); err != nil { log.Warn("Failed to create OpenID Connect Provider with name '%s' with url '%s': %v", providerName, openIDConnectAutoDiscoveryURL, err) |