From 9c344a0a95c44ef9cebade7b8a65ac160d9eb900 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 11 Feb 2017 20:20:35 +0000 Subject: Revert "Remove the oauth_callback_url config option" --- server/auth/google/google.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/auth/google/google.go') diff --git a/server/auth/google/google.go b/server/auth/google/google.go index 305b6f4..8c6f53b 100644 --- a/server/auth/google/google.go +++ b/server/auth/google/google.go @@ -43,6 +43,7 @@ func New(c *config.Auth) (*Config, error) { config: &oauth2.Config{ ClientID: c.OauthClientID, ClientSecret: c.OauthClientSecret, + RedirectURL: c.OauthCallbackURL, Endpoint: google.Endpoint, Scopes: []string{googleapi.UserinfoEmailScope, googleapi.UserinfoProfileScope}, }, @@ -100,8 +101,7 @@ func (c *Config) Revoke(token *oauth2.Token) error { } // StartSession retrieves an authentication endpoint from Google. -func (c *Config) StartSession(state string, r *http.Request) *auth.Session { - c.config.RedirectURL = auth.Oauth2RedirectURL(r) +func (c *Config) StartSession(state string) *auth.Session { return &auth.Session{ AuthURL: c.config.AuthCodeURL(state, oauth2.SetAuthURLParam("hd", c.domain)), } -- cgit v1.2.3