PHP Login Framework with OAUTH
A minimal, yet extremely functional framework, with social network/OAUTH provider integration.
Some 9 hours later, here it is! Please contribute to the development if you can. I think it's very secure and functional as it is, and is close to production-grade. I will be using one of my Bootstrap templates with this; I might release that soon too.
Top Features & Benefits to Consider:
- Cryptographically secure,
- Secure against SQL-injection,
- Reset password function,
- Social provider implementations with OAUTH2,
- Lightweight, and
- Hella easy to configure.
Dependencies & Credits to:
- HybridAuth (a powerful OAUTH library),
- Medoo (a very light MySQL database framework), and
- FontAwesome (social icons).
Social Login Resources:
STEP 1 - Import the MySQL Structure:
Import the file: db.sql
STEP 2 - Modify index.php.
- Point to the right location (_HOME),
- Enter your MySQL database and table information,
- Configure your email (in $headers),
- Add your own template, html, and so on. I'll release another version that's prettier (eventually).
STEP 3 - Modify lib/hybridauth/config.php
- Decide which Social login providers you'd like to use, and get your credentials ready.
- Add with your OAUTH API access keys and secrets,
- Set ones you don't want to false if you don't intend on using certain providers (modify login.php to reflect this, too)
- For Google, be sure to enable the Google+ API.
- Be sure to turn your app to live within the Facebook, LinkedIn, and Google developers consoles.
Planned future improvements (Updated 12/20):
Bootstrap integration (done, just need to push to git)
Human checker on form submissions (JS and/or server-side).
- TODO: Ajax submissions and DOM manipulation (w/ jQuery)
- TODO: limit forgotten PW requests to 1 + add expiration to reset code (~1 day).
Did you enjoy this post?