When 'OpacPublic' is set to NO, a successful login will load the main OPAC page (opac-main.pl), that's good, correct and expected The bug is that with 'OpacPublic' set to OFF and 'GoogleOpenIDConnect' set ON - a successful login redirects the user to their account page (opac-user.pl) not the main OPAC page, that's unexpected and bad
(In reply to Mason James from comment #0) > When 'OpacPublic' is set to NO, a successful login will load the main OPAC > page (opac-main.pl), that's good, correct and expected > > The bug is that with 'OpacPublic' set to OFF and 'GoogleOpenIDConnect' set > ON - a successful login redirects the user to their account page > (opac-user.pl) not the main OPAC page, that's unexpected and bad oops, s/NO/OFF/
Created attachment 60236 [details] [review] Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination. to test this patch... 1/ configure a working 'GoogleOpenIDConnect' account 2/ set 'OpacPublic' syspref to OFF 3/ log in user successfully via google-auth, observe redirect to opac-user.pl (bad) 4/ apply patch 5/ log in user successfully via google-auth, observe expected redirect to opac-main.pl (good)
Google Open ID Connect authentication broke when bug 17486 was pushed. Need to fix it before testing this. See bug 18144.
Dependencies have been resolved and this should now be testable again even with a sandbox. Sadly I have no idea about how to set up GoogleOpenIDConnect. Can you provide a more detailed test plan? Maybe a list to the mailing list would also help find a tester using this feature.
The instructions are generally on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16892#c3 The difficulty is Google keeps changing their API so it is a pain. Between steps 10 and 11: Once you've created the project, and you get the nice notification in the top right (bell should have a pretty red 1) click the notification and you will be taken to a massive information overload page where it makes no sense to a normal person with many boxes. In the top left, you will notice that the top left area will have a nice three line square beside "Google APIs" and then the project you just created in a drop down. Click the three line square. This will give you a drop down left pane that has "API & Services" at the top. Hover over it, and then you will get a submenu with 'Credentials' at the bottom. Step 11: Click credentials
(In reply to M. Tompsett from comment #5) > The difficulty is Google keeps changing their API so it is a pain. I meant UI, sorry. Still, you would hope they would stop re-arranging things.
Okay... So currently: OpacPublic: Disabled, GoogleOpenIDConnect: No -> General search page OpacPublic: Enabled, GoogleOpenIDConnect: No -> User Page OpacPublic: Disabled, GoogleOpenIDConnect: Yes -> User Page OpacPublic: Enabled, GoogleOpenIDConnect: Yes -> User Page Hence the test plan where GoogleOpenIDConnect is Yes, and OpacPublic is Disabled. > 1/ configure a working 'GoogleOpenIDConnect' account See comment #5 which also links back to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16892#c3 > 2/ set 'OpacPublic' (under OPAC) to 'Disabled' and 'GoogleOpenIDConnect' (under Administration) to 'Yes'. > 3/ log in user successfully via google-auth, observe redirect to > opac-user.pl (bad) As noted above in my preliminary testing. > 4/ apply patch -- on kohadevbox remember to restart all! Plack is unforgiving. :) > 5/ log in user successfully via google-auth, observe expected redirect to > opac-main.pl (good) -- which matches the behaviour regardless of GoogleOpenIDConnect, as it should.
Created attachment 68237 [details] [review] Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination. TEST PLAN ---------- 1/ configure a working 'GoogleOpenIDConnect' account See comment #5 which also links back to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16892#c3 2/ set 'OpacPublic' (under OPAC) to 'Disabled' and 'GoogleOpenIDConnect' (under Administration) to 'Yes'. 3/ log in user successfully via google-auth, observe redirect to opac-user.pl (bad) 4/ apply patch -- on kohadevbox remember to restart all! Plack is unforgiving. :) 5/ log in user successfully via google-auth, observe expected redirect to opac-main.pl (good) While I would normally suggest running koha qa test tools, because this file doesn't end in .pl, it doesn't get picked up by them. 6/ perlcritic -4 opac/svc/auth/googleopenidconnect -- notice this is a level better than required. :) This also eyeballs easily well. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 68694 [details] [review] Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination. TEST PLAN ---------- 1/ configure a working 'GoogleOpenIDConnect' account See comment #5 which also links back to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16892#c3 2/ set 'OpacPublic' (under OPAC) to 'Disabled' and 'GoogleOpenIDConnect' (under Administration) to 'Yes'. 3/ log in user successfully via google-auth, observe redirect to opac-user.pl (bad) 4/ apply patch -- on kohadevbox remember to restart all! Plack is unforgiving. :) 5/ log in user successfully via google-auth, observe expected redirect to opac-main.pl (good) While I would normally suggest running koha qa test tools, because this file doesn't end in .pl, it doesn't get picked up by them. 6/ perlcritic -4 opac/svc/auth/googleopenidconnect -- notice this is a level better than required. :) This also eyeballs easily well. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 17.11, thanks to everybody involved!