Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Login framework to include google/facebook/openid etc

In my website, i've built a login system which is quite simple.. I started implementing the facebook login option and it got a bit messy,

I'm looking for some sort of framework/code sample + db structure sample of a code that bundles the whole thing. Logins/registrations via google/facebook/openid and as many others you know of.

Stackoverflow has a very similar mechanism of what I am looking for.

Anyone knows of such a system?

like image 247
Or Weinberger Avatar asked Jan 10 '11 14:01

Or Weinberger


1 Answers

Not sure of any existing framework but this DB schema will satisfy all your expectations:

users table - contains all user-related fields, except of authentication ones.

Plus 1 table per each authentication system:

auth_openid with 2 fields openid_token | user_id
auth_facebook with facebook_uid | user_id

etc

like image 100
zerkms Avatar answered Sep 20 '22 15:09

zerkms