PacketFence - BTS - PacketFence
View Issue Details
0001680PacketFencecaptive portalpublic2013-08-12 06:092013-08-12 11:40
KimHagen 
francis 
normalmajoralways
resolvedfixed 
4.0.4 
4.0.5-2 
0001680: Oauth stopped working getting error "OAuth2 Error: Failed to get the token"
4.0.3 the Oauth for google/facebook works, but on the 4.0.4-2 and 4.0.5 release i get:

"OAuth2 Error: Failed to get the token"

Aug 12 12:00:50 oauth2.cgi(0) DEBUG: instantiating new pf::Portal::Session object (pf::Portal::Session::new)
Aug 12 12:00:50 oauth2.cgi(0) DEBUG: instantiating new pf::Portal::Profile object (pf::Portal::Profile::new)
Aug 12 12:00:50 oauth2.cgi(0) INFO: Sending 04:f7:e4:83:6a:c6to OAuth2 - Provider:google (ModPerl::ROOT::ModPerl::PerlRun::usr_local_pf_html_captive_2dportal_oauth2_2ecgi::handler)
Aug 12 12:00:51 oauth2.cgi(0) DEBUG: instantiating new pf::Portal::Session object (pf::Portal::Session::new)
Aug 12 12:00:51 oauth2.cgi(0) DEBUG: instantiating new pf::Portal::Profile object (pf::Portal::Profile::new)
Aug 12 12:00:51 oauth2.cgi(0) DEBUG: API CODE: 4/DrEXOm0luo4KbOkcbpC-bIyYZOuj.6tUntWmjEQYLOl05ti3ZT3ZXUPTjgAE (pf::web::generate_oauth2_result)
Aug 12 12:00:51 oauth2.cgi(0) INFO: OAuth2: failed to receive the token from the provider, redireting to login page (pf::web::generate_oauth2_result)
Aug 12 12:00:51 oauth2.cgi(0) DEBUG: rendering template named login.html (pf::web::generate_login_page)

I have tried a clean install of 4.0.5 on debian wheezy

Kind regards,

Kim
No tags attached.
Issue History
2013-08-12 06:09KimHagenNew Issue
2013-08-12 10:11KimHagenNote Added: 0003391
2013-08-12 11:09francisNote Added: 0003392
2013-08-12 11:30KimHagenNote Added: 0003393
2013-08-12 11:40francisStatusnew => resolved
2013-08-12 11:40francisFixed in Version => 4.0.5-2
2013-08-12 11:40francisResolutionopen => fixed
2013-08-12 11:40francisAssigned To => francis

Notes
(0003391)
KimHagen   
2013-08-12 10:11   
I have tried to debug it a little.

On the file /usr/local/pf/lib/pf/web.pm in line 389 i set a log setting for the "@" variable.
This is what i get in the log:
Can't call method "get_access_token" on an undefined value at /usr/local/pf/lib/pf/web.pm line 386.

I do not know where this should be defined.

Kind regards,

Kim
(0003392)
francis   
2013-08-12 11:09   
Can you try this patch?

https://github.com/inverse-inc/packetfence/commit/9c52b4e1c2cb263de6677c8fa24bf2aeb48fc35b [^]

Thanks!
(0003393)
KimHagen   
2013-08-12 11:30   
Ha Francis,

You patch works, thank you very much!!

regards,
Kim