From fe6235b40ed18909742eee2c3ae7a5f4fefaa010 Mon Sep 17 00:00:00 2001 From: Neil Lalonde <neillalonde@gmail.com> Date: Thu, 31 Jul 2014 14:49:01 -0400 Subject: [PATCH] FIX: google oauth2 for sites using https. Need to specify the redirect_uri during setup in this case. --- lib/auth/google_oauth2_authenticator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/auth/google_oauth2_authenticator.rb b/lib/auth/google_oauth2_authenticator.rb index 86af469e2..aee5486ce 100644 --- a/lib/auth/google_oauth2_authenticator.rb +++ b/lib/auth/google_oauth2_authenticator.rb @@ -36,7 +36,8 @@ class Auth::GoogleOAuth2Authenticator < Auth::Authenticator strategy = env["omniauth.strategy"] strategy.options[:client_id] = SiteSetting.google_oauth2_client_id strategy.options[:client_secret] = SiteSetting.google_oauth2_client_secret - } + }, + :redirect_uri => "#{Discourse.base_url}/auth/google_oauth2/callback" end protected