Bug 36617 - The old googleopenidconnect service should redirect to page that initiated login
Summary: The old googleopenidconnect service should redirect to page that initiated login
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nicholas van Oudtshoorn
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-17 08:16 UTC by Nicholas van Oudtshoorn
Modified: 2025-01-08 01:29 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Allow old googleopenidconnect service to redirect to referring page if possible and appropriate. (2.01 KB, patch)
2024-04-17 08:42 UTC, Nicholas van Oudtshoorn
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas van Oudtshoorn 2024-04-17 08:16:20 UTC
Splitting bug 34164 up, with this bug referring to the old googleopenidconnect service.

At the moment, a successful googleopenidconnect login is sent to opac-user.pl/opac-main.pl or mainpage.pl instead of the page that initiated the login process.
Comment 1 Nicholas van Oudtshoorn 2024-04-17 08:42:56 UTC
Created attachment 164981 [details] [review]
Allow old googleopenidconnect service to redirect to referring page if possible and appropriate.
Comment 2 Shi Yao Wang 2024-09-26 14:31:26 UTC
Can we get a test plan in the commit message with this?
https://wiki.koha-community.org/wiki/Commit_messages
Comment 3 Lisette Scheer 2025-01-07 17:02:43 UTC
(In reply to Shi Yao Wang from comment #2)
> Can we get a test plan in the commit message with this?
> https://wiki.koha-community.org/wiki/Commit_messages

Yes, please provide a test plan.
Comment 4 David Cook 2025-01-08 01:29:14 UTC
Looking at this and bug 34164... this code should be in its own function in a Perl module. For example:

my $koha_referrer = C4::Context::koha_referrer({
    interface => $interface,
    referrer_url => $referrer_url,
});

--

Also, the issues Lukas Koszyk mentions on bug 34164 should also be addressed.

These will also be easier to address when using a dedicated function in a Perl module.

--

I've used the C4::Context module here, since the referrer is specific to the web context. 

I suppose you could make an argument that it should be in a Koha::Auth:: module instead. Heck... maybe even Koha::Auth::Referrer. 

--

Anyway, I'm not trying to dictate how it should go. Just that the code should be in its own function in a Perl module so that it's not duplicated and so that it's easily tested :)