[Koha] OAuth2

Daniel Owens dcowens76 at gmail.com
Tue Apr 21 17:58:52 NZST 2015

On 4/21/15 12:22 PM, Robin Sheat wrote:
> Daniel Owens schreef op di 21-04-2015 om 10:50 [+0700]:
>> It turned out that my googleoauth2 file was missing #! /usr/bin/perl
>> in
>> the header, and instead had a partial email address. I am guessing
>> that
>> was due to my own misapplying the patch or something, but if anyone
>> else
>> has this problem, I just fixed the header of the Perl file.
> Sweet, hopefully it's all good now :)
Yes! Thanks for your patient help. Now to get it working on our school's 
opac. But that should go smoothly since it is the same version of Koha.

The one thing I am unclear about is how the redirect url in googleoauth2 
is supposed to work. It appears that $host ought to bring in the base 
url for the opac. It is declared as:

my $host = C4::Context->preference('OPACBaseURL');

But then:

my $redirecturl = 'http://' . $host . '/cgi-bin/koha/svc/googleoauth2';

Produces an error with Google. I modified it to include the opac base url:

my $redirecturl = 'http://' . $host . 

And that works. Not sure if I have not declared the base url somewhere 
or what, but my hack at least works.


More information about the Koha mailing list