[MODULE] Yiiauth

edit Ignore, it’s a fresh install and I haven’t setup the User class yet.”

You must have a user database table,and a user model class. Else it’s impossible to know if the user have logged in before:p

My opinion on this is that you shouldn’t have done that.

I don’t think Sampa would mind that you joined the Yiiauth team and contributed to it.

Personally, I’d rather see one great and well maintained auth module than a whole host of spin-offs.

Of course, Sampa (and I, when I get the time to join Yiiauth) can merge your changes back into Yiiauth, but I think this module needs more cooks in the kitchen. :)

Yeah, if the goal is to get the best possible module we should all work together. Unless it’s prestige that counts.

I have a shitload of stuff currently and currently I cannot realise the ideas I have.

One thing I think would be great is a basic complete user handling, i left my controller/model there as reference but I think beside optimising the performance/ease the installation that would be the next step in features.

Imho it would be great if one could just add yiiauth to the skeleton app and get it working. and from there modify to your personal needs. After that I would love to see a guide for integrating it with Yum and yii-user since those two modules are widely used…

OK, this fragmentation/duplication of effort is counter-productive. I personally don’t like the implementation as a module, so was hoping to see a simple extension or component wrapping HybridAuth from markvr. Even using a custom controller to manage the routes, with HybridAuth as an extension would be better.

For now, I am using Yiiauth since I want a single user to be able to use multiple providers as Yiiauth allows, but markvr’s implementation does not.

Thanks for your efforts, both of you, but can we get some consolidation?

I wouldnt mind that, Jacmoe has offered to help when he has time. I needed hybridauth for one of my projects and did the best I could :P Yiiauth is on github and the more improvements the better.

But I dont know have the skills or time to do it myself currently.

check your PHP version, it should be 5.3+ (preferably 5.3.2+)

Great module for openID authentication. I wondered if there is possible to make this module work with GoogleAPIs. I tried implementing googleapis extention, but got messed up on redirectUris. Maybe you know another great way to implement GoogleAPIs?

I didn’t understand this step:

You have to extend application.components.controller to Yiiauth

<?php class Controller extends Yiiauth{…?>

Where should I extend? What file?

I didn’t understand this step:

You have to extend application.components.controller to Yiiauth

<?php class Controller extends Yiiauth{…?>

Where should I extend? What file?

Guys where do I Put this code… should it be in main controller whos view uses the loginwidget.


You have to extend application.components.controller to Yiiauth

<?php class Controller extends Yiiauth{...?>



I am getting this error and i guess it is because of this

Hi

I am New to Yii Framework. i am not able to maintain session, after redirection from facebook, twitter. when, i already logged in with my form feilds. please help me. i am using Yiiauth(downloaded from github).

Hi All,

I have a problem here with the extension.

I am able to login using the Facebook and also am able to fetch the details from the facebook and store it to my DB .But i am not able to login using the other providers or get data from other providers. After adding other provider I cannot get data from facebook even. Desperatley need help on this.

I am using the my own code to store user data.

Also i want to know what is the difference between Yiiauth and Hybridauth extensions.

Are they the same , can i club these if needed.

they are very similar, both implementing the hybridauth PHP library (http://hybridauth.sourceforge.net/)…hybridauth extension is more recent and combines yiiauth with some community requested features/implementation details

Hi, I am getting this error. Pls help me, how to come out this error.

require_once(/hybridauth/Hybrid/Auth.php): failed to open stream: No such file or directory .

Hi, I solved my error. Thank u.

Now i’m getting another error,

 When i click Facebook, Google and Twitter without asking any username and password it showing my website.

pls give me solution for this.

Hey friends.

My site is working with yiiauth extension.

I want send post on wall (facebook)

In hybridauth extension.


$ha = Yii::app()->getModule('hybridauth')->getHybridAuth();

$facebook = $ha->getAdapter('facebook');

$facebook->setUserStatus('Hi');

What do I need to do this in the extension yiiauth.

help me.

Found small typo in Yiiauth (59) $identity=new userIdentity($user->username, "");

should be with first letter UCase.

Did Facebook change their API or something? Im getting everytime an error like:


Authentification failed! facebook returned an invalide user id. 

any guesses?

I wanted to capture more information from the Provider to store on my User table so I changed YiiAuth.php to call a method in my User model instead. In workOnUser

if ( &#33;Yii::app()-&gt;user-&gt;isGuest ){

$social->yiiuser = Yii::app()->user->id;

			&#036;user = &#036;userClass::model()-&gt;findByPk(Yii::app()-&gt;user-&gt;id);


			// refresh the details, particularly as this is a new feature


			&#036;user-&gt;updateYiiAuth(&#036;user_profile, &#036;provider);


		}else{


		// we want to create a new &#036;userClass - CB moved this to base User model


			&#036;user = new &#036;userclass;


			&#036;user-&gt;connectYiiAuth(&#036;user_profile, &#036;provider);	


			&#036;social-&gt;yiiuser = &#036;user-&gt;id;


		}

I wanted to capture more information from the Provider to store on my User table so I changed YiiAuth.php to call a method in my User model instead. In workOnUser




    if ( !Yii::app()->user->isGuest ){

          $social->yiiuser = Yii::app()->user->id;	

	  $user = $userClass::model()->findByPk(Yii::app()->user->id);

	  // refresh the details, particularly as this is a new feature

	  $user->updateYiiAuth($user_profile, $provider);

    }else{

	  // we want to create a new $userClass - CB moved this to base User model

	  $user = new $userclass;

	  $user->connectYiiAuth($user_profile, $provider);	

	  $social->yiiuser = $user->id;

    }