Skip to content

Commit

Permalink
Remove references to Google+ in Google provider
Browse files Browse the repository at this point in the history
  • Loading branch information
bentranter committed Oct 12, 2018
1 parent 819a7c4 commit d18d22e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions providers/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const endpointProfile string = "https://www.googleapis.com/oauth2/v2/userinfo"

// New creates a new Google+ provider, and sets up important connection details.
// New creates a new Google provider, and sets up important connection details.
// You should always call `google.New` to get a new Provider. Never try to create
// one manually.
func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
Expand All @@ -31,7 +31,7 @@ func New(clientKey, secret, callbackURL string, scopes ...string) *Provider {
return p
}

// Provider is the implementation of `goth.Provider` for accessing Google+.
// Provider is the implementation of `goth.Provider` for accessing Google.
type Provider struct {
ClientKey string
Secret string
Expand Down
6 changes: 3 additions & 3 deletions providers/google/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import (
"github.com/markbates/goth"
)

// Session stores data during the auth process with Google+.
// Session stores data during the auth process with Google.
type Session struct {
AuthURL string
AccessToken string
RefreshToken string
ExpiresAt time.Time
}

// GetAuthURL will return the URL set by calling the `BeginAuth` function on the Google+ provider.
// GetAuthURL will return the URL set by calling the `BeginAuth` function on the Google provider.
func (s Session) GetAuthURL() (string, error) {
if s.AuthURL == "" {
return "", errors.New(goth.NoAuthUrlErrorMessage)
}
return s.AuthURL, nil
}

// Authorize the session with Google+ and return the access token to be stored for future use.
// Authorize the session with Google and return the access token to be stored for future use.
func (s *Session) Authorize(provider goth.Provider, params goth.Params) (string, error) {
p := provider.(*Provider)
token, err := p.config.Exchange(goth.ContextForClient(p.Client()), params.Get("code"))
Expand Down

0 comments on commit d18d22e

Please sign in to comment.