Bug 23520 - Error: invalid_request using Google OpenID Authentication
Summary: Error: invalid_request using Google OpenID Authentication
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: 17.11
Hardware: PC Linux
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 13:36 UTC by Guillermo
Modified: 2023-09-06 12:41 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillermo 2019-08-29 13:36:33 UTC
Hi there,

We are trying unsuccessfully to connect an instance of Koha 17.11.18.000 to Google OpenID following the instructions provided here: https://koha-community.org/manual/17.11/html/02_administration.html?highlight=google#google-openid-connect.

This is the error that we get:

400. That’s an error.

Error: invalid_request

Invalid parameter value for redirect_uri: Missing scheme: /cgi-bin/koha/svc/auth/googleopenidconnect

Learn more
Request Details

    response_type=code
    redirect_uri=/cgi-bin/koha/svc/auth/googleopenidconnect
client_id=151271246332-2rutdao24k2as059d4ht7gmo0utln43l.apps.googleusercontent.com
    scope=openid email profile
    state=auth_660a4a0ed00714e959894abe360a3532

That’s all we know.

We have checked that we have a client ID and a client secret; and that the authorized JavaScript origins, as well as the authorized redirect URLs, match the URL of the OPACBaseURL and http://YOUROPAC/cgi-bin/koha/svc/auth/googleopenidconnect <http://YOUROPAC/cgi-bin/koha/svc/auth/googleopenidconnect>.

We have also checked that the values of GoogleOAuth2ClientID and GoogleOAuth2ClientSecret in Koha match the values of the Google client ID and the client secret.

We are not sure whether we are missing something or there is something wrong in the docs, Koha 17.11 or the connector.

Many thanks in advance.
Comment 1 Katrin Fischer 2019-08-31 07:34:28 UTC
Hi Guillermo, normally I'd 'please ask on the mailing list' - but I see that you've already tried. Adding the link to the mailing list thread here - hope someone will be able to help you:
https://lists.katipo.co.nz/pipermail/koha/2019-August/053527.html
Comment 2 Jonathan Druart 2023-09-06 12:41:16 UTC
50 my $host             = C4::Context->preference('OPACBaseURL') // q{};

55 my $redirecturl  = $host . '/cgi-bin/koha/svc/auth/googleopenidconnect';

121             redirect_uri  => $redirecturl,

My guess is that OPACBaseURL was not set.