[MODULE] HybridAuth

I’m getting the same error. Using the GitHub version.

I uncommented the url manager par in the config and added index.php/ to the base url

Thanks, I just implemented a similar hack.

I also had to change the names in the config settings to match the filenames in hybridauth/Hybrid/Providers (Facebook.php. Google.php, etc). For example, in the config, I changed facebook to Facebook, google to Google, etc. This is definitely something that should be fixed considering how many people use linux hosts, where capitalization matters (as opposed to Windows).

You should report those as issues on github so that they can be discussed and worked on in a transparent way.

https://github.com/markvr/hybridauth

I’m still working on figuring out how exactly it works before I suggest specific changes.

The code is very clean and organized, and the overall design seems more agreeable than the yii-auth extension.

There does seem to be just a few bugs that need to be worked out before it can serve as a solid "starting point" for HybridAuth integration.

For one, I get an error like the one mentioned by pompey_pete in post #55 of this thread, about DefaultController.php not existing at times. For example, if I try to login using FB, but cancel when FB asks me to confirm, I get that error after getting redirected to


http://localhost/webapp/hybridauth/default/login/?provider=Facebook#_=_

Not sure how the #= on the end got there. Then, I need to clear the session before the error about DefaultController.php not existing it will go away.

I’m trying to figure out what is causing that error if anyone else wants to help.

I have the same error. I am not a big professional in yii, so who can help me?

Just a note I have version 1.2 installed and when I was trying it I got require_once example google.php for the list of providers error and after changing the module configuration in main from google to Google the error disappeared

before




'hybridauth' => array(

'baseUrl' => 'http://'. $_SERVER['SERVER_NAME'] . '/hybridauth', 

'withYiiUser' => false, // Set to true if using yii-user

"providers" => array ( 

"openid" => array (

"enabled" => true

),


"yahoo" => array ( 

"enabled" => true 

),


"google" => array ( 

"enabled" => true,

"keys"    => array ( "id" => "", "secret" => "" ),

"scope"   => ""

),


"facebook" => array ( 

"enabled" => true,

"keys"    => array ( "id" => "", "secret" => "" ),

"scope"   => "email,publish_stream", 

"display" => "" 

),


"twitter" => array ( 

"enabled" => true,

"keys"    => array ( "key" => "", "secret" => "" ) 

)

)

),



After




'hybridauth' => array(

'baseUrl' => 'http://'. $_SERVER['SERVER_NAME'] . '/hybridauth', 

'withYiiUser' => false, // Set to true if using yii-user

"providers" => array ( 

"openid" => array (

"enabled" => true

),


"Yahoo" => array ( 

"enabled" => true 

),


"Google" => array ( 

"enabled" => true,

"keys"    => array ( "id" => "", "secret" => "" ),

"scope"   => ""

),


"Facebook" => array ( 

"enabled" => true,

"keys"    => array ( "id" => "", "secret" => "" ),

"scope"   => "email,publish_stream", 

"display" => "" 

),


"Twitter" => array ( 

"enabled" => true,

"keys"    => array ( "key" => "", "secret" => "" ) 

)

)

),



I was to login with yahoo

But coming back to my page am getting

The CSRF token could not be verified.

I have CSRF enable any idea how to fix this.

I have tried disabling CSRF but after logging with the provider why does it give me a form to enter username and email.

I have the same 404 problem with this URL …//[server]/hybridauth/default/login/?provider=Facebook

What should I do so It can find the Url. I have no UrlManager Entry in my config.

By the way , I´m a newbie in Yii :slight_smile:

Thank´s

I think you need to make sure UrlFormat is set to path (for this specific extension)

http://www.yiiframew…l#creating-urls




'urlFormat'=>'path',



Hello,

did someone manage to get the facebook auth dialog display in a popup ?

I´ve put in my config "display" => "popup" but did not change the default page display.

Do I have to use the Facebook JS SDK ?

Thank´s

Hi Mark,

The extension works great as it is, but the ha->login() failed when I tried to use ajax call. I can’t figure out why the library does not work for ajax call. Any advice?

Thanks,

James

im getting message saying


" Something went wrong, did you cancel? "

i had the same problem and finally fixed it. remove the try /catch in your calls and tell me what it says

Sorry, I’ve been away/busy a lot, I’ll try and reply to some of the posts…!

That’s weird, because I use Linux as well. I’ll take a look.

Because it uses browser redirects to the provider to get a ticket for the user. You can’t do these redirects with AJAX. If you use a browser developer tool to record all the requests you’ll see what I mean.

I wasn’t even aware Yii had CSRF protection built in, I’ll have a look.

This is by design because you won’t neccesarily get those from the provider, so the user is given a chance to choose their username etc.

Read the "Notes" section on the extension homepage, i.e. comment out the try…catch to see what the actual error is.

Sorry, yes you probably do. I’ll investigate URLManager, I wasn’t really aware of it before.

private function _loginUser($identity) {

Yii::app()->user->login($identity,0);

}

why is it user->login is not working? I think its something conflict with the session of hybridauth and yii. this is my configuration in session.

‘session’ => array(

        'class' => 'system.web.CDbHttpSession',


        'connectionID' => 'db',


        'timeout' => 7200, // 2 hour


    ),