diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm index 79eb29aba4..052e97630b 100644 --- a/perllib/FixMyStreet/App/Controller/Auth.pm +++ b/perllib/FixMyStreet/App/Controller/Auth.pm @@ -44,10 +44,7 @@ sub general : Path : Args(0) { # decide which action to take $c->detach('code_sign_in') if $clicked_sign_in_by_code || ($data_email && !$data_password); - if (!$data_username && !$data_password && !$data_email && $c->get_param('social_sign_in')) { - $c->forward('social/handle_sign_in'); - } - + $c->detach('social/handle_sign_in') if $c->get_param('social_sign_in'); $c->forward( 'sign_in', [ $data_username ] ) && $c->detach( 'redirect_on_signin', [ $c->get_param('r') ] ); diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index 4211e56054..b40ceca29b 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -143,6 +143,7 @@ for my $state ( 'refused', 'no email', 'existing UID', 'okay' ) { update => 'Test update', }; } + $mech->form_with_fields('social_sign_in'); $mech->submit_form(with_fields => $fields, button => 'social_sign_in'); # As well as the cookie issue above, caused by this external diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html index b9b524a29d..e6d8d2c525 100644 --- a/templates/web/base/auth/general.html +++ b/templates/web/base/auth/general.html @@ -18,14 +18,12 @@
[% loc('Sorry, we could not log you in. Please fill in the form below.') %]
[% END %] - +[% IF c.cobrand.feature('oidc_login') AND NOT oauth_need_email %] +