3

Is there any OpenID implementation on Laravel ? (Provider and Consumer)

What I'm trying to do is having One CoreApp acting like an OpenID Provider, and the otherApps as OpenID Consumers so the user can choose between :

  • Login with the CoreApp OpenID system
  • Login with other OpenID Providers (Google, Facebook, Twitter...)
  • Creating an account which means the user will be redirect to the CoreApp for creating an other account and will use that account as OpenID account to login with it on his App.

I see that oAuth (1 & 2) are meant too for this usage ? any Laravel tutorial/howto ?

Due to the beta stage of L4 (Beta1), I guess I'm good to go with L3 for production ?

I'm fairly new to Laravel, Still in the RTFM level :)

cyberhicham
  • 495
  • 1
  • 10
  • 24

2 Answers2

4

Check out HybridAuth. It's framework agnostic and integrates may OAuth and OAuth 2.0 providers.

Here is a basic example on how to implement into Laravel 4: http://www.mrcasual.com/on/coding/laravel4-package-management-with-composer/

pkat
  • 156
  • 1
  • 4
  • It looks nice, Can HybridAuth act as An OpenID/oAuth provider ? So I can add my CoreApp as an OpenID provider ? – cyberhicham Jan 27 '13 at 23:19
  • No HybridAuth cannot. I'd suggest using other packages for that. I came across one that may be worth looking into: [oauth2-server-php](https://packagist.org/packages/bshaffer/oauth2-server-php) – pkat Feb 19 '13 at 01:53
3

The best route to go down with this is probably to look for something that's framework agnostic, i.e. something that would work with any PHP framework, but still does all the hard work for you.

Take a look at Packagist for lots of these, including a few good multi-provider OpenID packages and OAuth packages.

They're all installable with composer, and you can do a lot of the setup for them in Laravel 3 (and 4's) start.php file.

Hope this helps!

Dan Matthews
  • 1,245
  • 2
  • 12
  • 24
  • Yeah, Composer is promising! Funny, I found a lot of 'packages' symfony ready, and then i noticed the 'relationship' between Laravel4 and Symfony – cyberhicham Jan 27 '13 at 23:22