Bug 29006 - Make GoogleOpenIDConnect options consistent in the OPAC
Summary: Make GoogleOpenIDConnect options consistent in the OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Manual
Depends on: 10988
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-13 14:45 UTC by Owen Leonard
Modified: 2022-06-06 20:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement improves the consistency of the OPAC login forms when using Google OpenID Connect. A "Log in with Google" button now appears above the Koha login form when logging in from the home page, "Log in to your account" in the navigation menu, and when accessed directly (/cgi-bin/koha/opac-user.pl).
Version(s) released in:
21.11.00


Attachments
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC (384.21 KB, patch)
2021-09-14 10:17 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC (384.26 KB, patch)
2021-09-22 22:55 UTC, David Nind
Details | Diff | Splinter Review
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC (384.33 KB, patch)
2021-09-26 10:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC (7.20 KB, patch)
2021-09-30 10:46 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-09-13 14:45:05 UTC
In the OPAC, when GoogleOpenIDConnect is enabled, the login options are inconsistent:

- The "Log in to your account" link in the header takes you straight to a Google form.
- The login form on the main page doesn't offer a link to Google login, just the standard login form.
- The login page offers both a GoogleOpenIDConnect link and a standard login form.

If GoogleOpenIDConnect is enabled, all login options should offer both Google and Koha login.
Comment 1 Owen Leonard 2021-09-14 10:17:58 UTC Comment hidden (obsolete)
Comment 2 David Nind 2021-09-21 21:55:48 UTC
Hi Owen.

After applying the patch, updating the css, flush_memcached, restart_all, and a fresh browser with the cache cleared I'm not seeing the changes come through in the OPAC (the login form on the main page and in the header).

It's probably something I haven't done....

David
Comment 3 Owen Leonard 2021-09-22 14:35:44 UTC
You populated these preferences? 

GoogleOAuth2ClientID
GoogleOAuth2ClientSecret

And turned this one on?

GoogleOpenIDConnect

Do you have any missing modules under About -> Perl modules?
Comment 4 David Nind 2021-09-22 22:55:23 UTC Comment hidden (obsolete)
Comment 5 David Nind 2021-09-22 22:57:01 UTC
(In reply to Owen Leonard from comment #3)
> You populated these preferences? 
> 
> GoogleOAuth2ClientID
> GoogleOAuth2ClientSecret
> 
> And turned this one on?
> 
> GoogleOpenIDConnect
> 
> Do you have any missing modules under About -> Perl modules?

All worked perfectly today! Must have been me not doing something right..¯\_(ツ)_/¯
Comment 6 Katrin Fischer 2021-09-26 10:48:35 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2021-09-29 09:44:27 UTC
Please resubmit without the changes to opac.css
Comment 8 Owen Leonard 2021-09-30 10:46:00 UTC
Created attachment 125486 [details] [review]
Bug 29006: Make GoogleOpenIDConnect options consistent in the OPAC

This patch makes modifications to OPAC templates to make the Google
login options more consistent.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- In the staff interface, enable the GoogleOpenIDConnect preference, and
  populate the GoogleOAuth2ClientID the GoogleOAuth2ClientSecret with
  values (they don't need to be valid).
- On the OPAC main page you should see a "Log in with Google" button
  above the Koha login form.
- If you click the "Log in to your account" link at the top of the page
  you should see a "Log in with Google" button in the modal window
- If you navigate directly to /cgi-bin/koha/opac-user.pl when not logged
  in you should see the same "Log in with Google" button on that page.
- In each case the Google button should point to /cgi-bin/koha/svc/auth/googleopenidconnect
- If you disable GoogleOpenIDConnect the buttons should disappear.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Owen Leonard 2021-09-30 10:46:28 UTC
(In reply to Jonathan Druart from comment #7)
> Please resubmit without the changes to opac.css

Whoops, sorry about that!
Comment 10 Jonathan Druart 2021-10-06 08:38:25 UTC
Pushed to master for 21.11, thanks to everybody involved!