News for hackers. Stuff that matters.

Opauth: Multi-provider authentication framework for PHP, inspired by OmniAuth

http://opauth.org

Just released v0.1.0 today. https://github.com/uzyn/opauth

If you are familiar with OmniAuth for Ruby, Opauth basically does the same thing, except for PHP.

Gave a talk on it today at Singapore PHP User Group. My deck: https://speakerdeck.com/u/uzyn/p/opauth-an-introduction

Opauth is still very new and I still need to work on the documentations a lot, especially tutorials and the wiki.

( 16 comments | 15 points | on HN )
Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Tuesday May 22, 2012 @12:29PM (#4008554)
Just released v0.1.0 today. https://github.com/uzyn/opauth

If you are familiar with OmniAuth for Ruby, Opauth basically does the same thing, except for PHP.

Gave a talk on it today at Singapore PHP User Group. My deck: https://speakerdeck.com/u/uzyn/p/opauth-an-introduction

Opauth is still very new and I still need to work on the documentations a lot, especially tutorials and the wiki.

Re:Opauth: Multi-provider authentication framework for PHP, ... by prplhaz4 on Wednesday May 23, 2012 @08:58PM (#4016179)
Have you seen hybridauth before? http://hybridauth.sourceforge.net/

If so any differentiators that would help us choose?

Re:Opauth: Multi-provider authentication framework for PHP, ... by fryguy on Tuesday May 22, 2012 @07:45PM (#4010704)
I really wish this was around 2 years ago when I made a site that used openid in PHP. I've dealt with so many nighmares of it I just threw it all away and now send people an email every time they want to log in. How do you deal with supporting every different little configuration of PHP servers? I had huge problems with having to put a hack into the code for lightopenid in order for it to work on my webhost, but that hack broke it on my machine.
Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Tuesday May 22, 2012 @11:24PM (#4011378)
I set a minimum requirement of Opauth Core to be PHP >= 5.2 (though technically it runs fine on >= 5.0) and tries as best as I could to not introduce any unnecessary dependencies, which is the reason why cURL isn't bundled and basic HTTP calls are made through get_file_contents(); and hashing is done through iterations of salted sha1() instead of bundling 3rd party encryption scheme.

Yes, file_get_contents() is not that great, but strategy developers can choose to require cURL if they want, just that Opauth Core doesn't require it.

Re:Opauth: Multi-provider authentication framework for PHP, ... by rmccue on Wednesday May 23, 2012 @04:28AM (#4012104)
I'm the developer of Requests (https://requests.ryanmccue.info/) which might be something for you to consider bundling with Opauth. There's a whole host of problems with using file_get_contents on various hosts, hence why cURL is so often used.
Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Wednesday May 23, 2012 @09:27AM (#4012917)
Thanks for that. Requests looks interesting. Opauth can consider bundling that to the core and replace my simple wrappers of file_get_contents().
Re:Opauth: Multi-provider authentication framework for PHP, ... by fryguy on Wednesday May 23, 2012 @02:31PM (#4014556)
file_get_contents() had huge problems working for me on my host. I think it was HTTPS, but I could be wrong.
Re:Opauth: Multi-provider authentication framework for PHP, ... by lux on Tuesday May 22, 2012 @01:23PM (#4008814)
Thanks, this looks pretty awesome! Also posted it to r/php as well:

http://www.reddit.com/r/PHP/comments/tzil2/opauth_multiprovi...

Now to go play with it some more... :)

Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Tuesday May 22, 2012 @01:33PM (#4008852)
Thanks for cross-posting it at Reddit. I'm statix on Reddit and just left a comment at your post. :)
Re:Opauth: Multi-provider authentication framework for PHP, ... by lux on Tuesday May 22, 2012 @01:53PM (#4008954)
No prob :) And good job, this looks really useful!

A few months back I had to integrate the usual auth providers and was it ever a hunt to find the best scripts for it. I ended up with tmhOAuth for Twitter, LightOpenID for OpenID and Google, and handling Facebook somewhat manually. Will be seriously looking at this as a replacement, and for my next project too.

Re:Opauth: Multi-provider authentication framework for PHP, ... by FLX on Tuesday May 22, 2012 @12:55PM (#4008669)
Nice, is there a Wordpress plugin in the works? I'm sure that a lot of people would be interested in this.
Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Tuesday May 22, 2012 @01:02PM (#4008699)
That's definitely one of the top frameworks/CMS to support. I'll get on with it if no one has started when I'm done with CakePHP-Opauth and Opauth's documentations.
Re:Opauth: Multi-provider authentication framework for PHP, ... by FLX on Tuesday May 22, 2012 @05:24PM (#4010089)
Awesome, thanks! I've been dying to switch off RPXnow :)
Re:Opauth: Multi-provider authentication framework for PHP, ... by hongster on Tuesday May 22, 2012 @12:55PM (#4008668)
Standardize interface for all OAuth providers. Extensible.
Re:Opauth: Multi-provider authentication framework for PHP, ... by uzyn on Tuesday May 22, 2012 @12:58PM (#4008682)
Not really just OAuth but it should work with even proprietary authentication providers as long as there is a compatible Opauth strategy for it.
Re:Opauth: Multi-provider authentication framework for PHP, ... by miccheng on Tuesday May 22, 2012 @12:38PM (#4008584)
Excellent library - has lotsa potential!