Yii Framework Forum: [MODULE] HybridAuth - Yii Framework Forum

Jump to content

  • (7 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[MODULE] HybridAuth Rate Topic: ***** 2 Votes

#61 User is offline   TonyB 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 08-March 12

Posted 21 August 2012 - 04:17 PM

View Postcharmi, on 20 August 2012 - 05:52 AM, said:

I think this is related to URL MANAGER
What should I do to fix this?



I'm getting the same error. Using the GitHub version.
0

#62 User is offline   charmi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 18-August 12

Posted 21 August 2012 - 04:22 PM

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

#63 User is offline   TonyB 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 08-March 12

Posted 21 August 2012 - 04:36 PM

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).
0

#64 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 108
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 22 August 2012 - 08:30 AM

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
0

#65 User is offline   TonyB 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 08-March 12

Posted 23 August 2012 - 02:57 PM

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.
2

#66 User is offline   hamster3d 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 26-August 12

Posted 26 August 2012 - 01:24 PM

View PostTonyB, on 23 August 2012 - 02:57 PM, said:


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 ... Then, I need to clear the session before the error about DefaultController.php not existing it will go away.



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

#67 User is offline   bonnie 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 62
  • Joined: 08-February 11

Posted 03 September 2012 - 08:32 AM

View Postmarkvr, on 02 July 2012 - 06:35 AM, said:

This is a forum page for the module Hybridauth (http://www.yiiframew...ion/hybridauth/) for social logins.

I've just put up the first release. Comments/thoughts etc let me know!

Thanks,
Mark


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.
0

#68 User is offline   GillesK 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 07-September 12

Posted 07 September 2012 - 03:13 PM

View Postcharmi, on 21 August 2012 - 04:22 PM, said:

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

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 :-)

Thank´s
0

#69 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 108
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 07 September 2012 - 03:18 PM

View PostGillesK, on 07 September 2012 - 03:13 PM, said:

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 :-)

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',

0

#70 User is offline   GillesK 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 07-September 12

Posted 08 September 2012 - 08:18 AM

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
0

#71 User is offline   jwu009 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 17-January 12

Posted 10 September 2012 - 10:51 PM

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
0

#72 User is offline   vijaykoogu 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-August 11
  • Location:Banglore

Posted 15 September 2012 - 12:14 AM

im getting message saying
" Something went wrong, did you cancel? "

0

#73 User is offline   brozerman 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 07-February 11

Posted 17 September 2012 - 04:39 AM

View Postvijaykoogu, on 15 September 2012 - 12:14 AM, said:

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
0

#74 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:18 PM

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

#75 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:18 PM

View PostTonyB, on 21 August 2012 - 04:36 PM, said:

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).


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

#76 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:23 PM

View Postjwu009, on 10 September 2012 - 10:51 PM, said:

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?


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.
0

#77 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:27 PM

View Postbonnie, on 03 September 2012 - 08:32 AM, said:

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 wasn't even aware Yii had CSRF protection built in, I'll have a look.

View Postbonnie, on 03 September 2012 - 08:32 AM, said:

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


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.
0

#78 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:28 PM

View Postvijaykoogu, on 15 September 2012 - 12:14 AM, said:

im getting message saying
" Something went wrong, did you cancel? "



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

#79 User is offline   markvr 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 37
  • Joined: 17-June 12

Posted 17 September 2012 - 04:30 PM

View PostPrplHaz4, on 07 September 2012 - 03:18 PM, said:

I think you need to make sure UrlFormat is set to path (for this specific extension)
http://www.yiiframew...l#creating-urls

'urlFormat'=>'path',



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

#80 User is offline   bryglen 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 02-April 11

Posted 20 September 2012 - 12:25 AM

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
),
0

Share this topic:


  • (7 Pages)
  • +
  • « First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users