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

Jump to content

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   markvr 

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

Posted 02 July 2012 - 06:35 AM

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
1

#2 User is offline   slvolz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 19-December 10

Posted 02 July 2012 - 02:59 PM

Nice looking module. I am trying it out. Is there a way to display the authentication for Yahoo or others in a pop-up versus to a new page? I see Facebook option for pop-up. I also see other providers for AOL, Windows Live and such can you give some doc as to configuration settings?

Thanks
0

#3 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 03 July 2012 - 03:05 AM

View Postslvolz, on 02 July 2012 - 02:59 PM, said:

Nice looking module. I am trying it out. Is there a way to display the authentication for Yahoo or others in a pop-up versus to a new page? I see Facebook option for pop-up. I also see other providers for AOL, Windows Live and such can you give some doc as to configuration settings?

Thanks

http://hybridauth.so.../userguide.html
0

#4 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 03 July 2012 - 03:06 AM

btw, why is openid not working? and the rest of the 28 provider... maybe put in a note about them:p
0

#5 User is offline   kitsched 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-July 12

Posted 03 July 2012 - 07:48 AM

Will try it out and I'm rooting for you to continue work on this extension. :)
0

#6 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 03 July 2012 - 08:08 AM

Okay, this is great - but why the heck are you not contributing to the already existing HybridAuth module??

If you wasn't aware of it, I can understand that you released this, but could you please consider joining Sampa?

His extension is called YiiAuth.
"Less noise - more signal"
0

#7 User is offline   PrplHaz4 

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

Posted 03 July 2012 - 06:33 PM

View Postjacmoe, on 03 July 2012 - 08:08 AM, said:

Okay, this is great - but why the heck are you not contributing to the already existing HybridAuth module??

If you wasn't aware of it, I can understand that you released this, but could you please consider joining Sampa?

His extension is called YiiAuth.


I agree we should not have multiple modules for this, but was under the impression that markvr was more-or-less taking over development from Sampa - but it would be nice if it were clear that yiiauth was being deprecated, and hybridauth was now the "official" extension for it...even better if it were a public repository (which, to me, should be standard for yii extensions to help reduce the fragmentation)...
1

#8 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 03 July 2012 - 08:40 PM

Even-even better would be if Yiiauth was maintained by both Sampa and Markvr and hosted on Bitbucket or Github. :)

Not trying to rain on any parade, but .. I've said what I wanted to say.
Besides: Yiiauth is a cooler name.
"Less noise - more signal"
0

#9 User is offline   kitsched 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 03-July 12

Posted 04 July 2012 - 06:39 AM

+1 for hosting this on GitHub.
0

#10 User is offline   Harimau 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 03-July 12

Posted 05 July 2012 - 09:32 PM

I installed this after trying to lightly customise yii-auth and encountering a lot of messy problems. This one was working the way I wanted in an hour or two. It's a much cleaner release. I've also customised this to only request a username/email if it can't retrieve an email from the provider. Worked with yii-user no problems. I've done fairly extensive testing with Yahoo, Google, Facebook, Twitter & Linked In and it all seems to be working.
0

#11 User is offline   markvr 

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

Posted 12 July 2012 - 08:34 AM

View Postjacmoe, on 03 July 2012 - 08:08 AM, said:

Okay, this is great - but why the heck are you not contributing to the already existing HybridAuth module??

If you wasn't aware of it, I can understand that you released this, but could you please consider joining Sampa?

His extension is called YiiAuth.


Because, and apologies to Sampa here, YiAuth is a mess. I started out using it as a base and rapidly realised it would be better to implement hybrid-auth from scratch again by extending CBaseUserIdentity, which seemed a more correct way to do it. YiiAuth requires you to extend ALL your controllers from it's class for example...rather than extending this Yii class.

And I called it "hybrid-auth" mainly because I'm lazy and unorignal (!) but also so it's clearer what it does. The name YiiAuth isn't overly clear what it does.

I'll continue developing this, I need to add OpenID support (I've been away for a week and just got back).
1

#12 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 12 July 2012 - 12:47 PM

View PostHarimau, on 05 July 2012 - 09:32 PM, said:

I installed this after trying to lightly customise yii-auth and encountering a lot of messy problems. This one was working the way I wanted in an hour or two. It's a much cleaner release. I've also customised this to only request a username/email if it can't retrieve an email from the provider. Worked with yii-user no problems. I've done fairly extensive testing with Yahoo, Google, Facebook, Twitter & Linked In and it all seems to be working.

tbh using yii-user with yiiauth took me less then 5 min when I helped a user who pm:ed me.

And extending the new useridentity class is not easier then extending one controller from the yiiauth componen.t. even if its a bad solution just fix that instead? because markvr, changing what class ONE controller extends from isnt that bad... Same as rights do (one of the most popular extensions for yii). And I use rights in all my projects so I thought it wouldnt be that big of a deal.

What bothers me is you complain about extending one's main controller from a yiiauth component instead of the base CController beeing awfull, when you expect people to do the exact same thing but wtih a useridentity, something people are alot less used to do. And you somehow lost the most basic easy to use login form and have to do a special fix for that? o_O

I wish you luck but this just seems like you do this for prestige since it is not good for anything else.

(the end product quality for the yii community).

Oh well:) glhf
0

#13 User is offline   markvr 

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

Posted 12 July 2012 - 05:05 PM

Hey I don't want to get into a spat over this, I'm sorry if I caused offence. I was simply explaining why I didn't continue to develop YiiAuth and instead started from scratch. For my purposes I needed something that could drop into the standard Yii skeleton app, to provide social auth alongside the default login controllers with the minimal modifications to existing apps. YiiAuth extends other classes that don't come with the default app OR the module - the class I was missing is called "Model" - and I had no idea what that did or where it came from.

When I looked at the code I decided it would be cleaner to reimplement it, and then thought I would release what I'd done.

I'm new to Yii (which is awesome BTW!) and I haven't studied any other extensions so maybe having all controllers extend from your classes is common, but to me it seemed to reduce the ability to "drop in" authentication methods with minimal changes the the rest of the app, which is what I wanted to do. I also don't understand how having all the controllers extend a modules class would scale to more than one module. You'd end up extending totally different unrelated classes on each other, with possible method/property name conflicts etc.
1

#14 User is offline   markvr 

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

Posted 14 July 2012 - 06:28 PM

Updated to support OpenID and use the Yii asset framework to handle icons.
0

#15 User is offline   markvr 

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

Posted 15 July 2012 - 05:51 AM

Updated to enable you to retrive the Hybrid_Auth adapter:
$adapter = Yii::app()->getModule('hybridauth')->getAdapter();


Use this to post status updates etc.

See the Hybrid Auth docs for more info - http://hybridauth.so...net/apidoc.html
0

#16 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 15 July 2012 - 09:01 AM

Since I raised the issue in the first place, let me clarify: I think it's OK that you go ahead and create your own HybridAuth extension.
If that works for you, then it's great. :)

There are several extensions which uses a common controller base - Rights is one of them (widely used) - and your approach is just as valid.

Time will tell which version is the strongest.

The ultimate 'solution' would of course be to fix YiiAuth so that it can support the two approaches.
That shouldn't be too hard, as common functionality could be extracted into a shared base.
But I digress.

The survival of an extension also depends on how well the extension is maintained..

Even though I am disappointed, I am fine with you deciding to go for your own extension.
"Less noise - more signal"
0

#17 User is offline   Sampa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 173
  • Joined: 18-December 11
  • Location:Stockholm,Sweden

Posted 15 July 2012 - 09:13 AM

Im sorry, I have been in a shitty mode apparently and my choice of words was bad.

I'm glad your back and updating this.

Perhaps jacmoe and I should help you instead.

I who has made the yiiauth extension and understand it could extract the usefull parts,
example would be the ability to have more then one provider connected to the same account.

(not that takes along time:p) but with a seperate table instead of modifying the user table fits the "just add it" mentality to, since you only have to run an sql command instead of modifying your table and model.

Edit*
I just realised:
An installer function could fix alot. adding a $install property, then checking if its true then create the neccessary tables and check requierements (if user model exists etc...) to prevent errors popping up all over the place (which normally happends with more complex modules.
1

#18 User is offline   markvr 

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

Posted 15 July 2012 - 09:53 AM

View Postjacmoe, on 15 July 2012 - 09:01 AM, said:

There are several extensions which uses a common controller base - Rights is one of them (widely used) - and your approach is just as valid.


How does that work if more than one extension/module does this?

As I put above:

Quote

I also don't understand how having all the controllers extend a modules class would scale to more than one module. You'd end up extending totally different unrelated classes on each other, with possible method/property name conflicts etc.


confused!
2

#19 User is offline   markvr 

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

Posted 15 July 2012 - 09:55 AM

View PostSampa, on 15 July 2012 - 09:13 AM, said:

An installer function could fix alot. adding a $install property, then checking if its true then create the neccessary tables and check requierements (if user model exists etc...) to prevent errors popping up all over the place (which normally happends with more complex modules.


Possibly, although I wonder if Yii migrations would be more suitable. I haven't looked at them much so I'm not sure yet.
0

#20 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 15 July 2012 - 04:03 PM

View Postmarkvr, on 15 July 2012 - 09:53 AM, said:

How does that work if more than one extension/module does this?


Good question. :)

Perhaps a behavior?

Could either be controller behavior or model behavior. Or perhaps even both?

That would probably be the best way to do it.
And ensure that it will coexist with other extensions.

And to comment on another thing: +1 for migrations. :)
"Less noise - more signal"
0

Share this topic:


  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

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