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:

  1. Cryptographically secure,
  2. Secure against SQL-injection,
  3. Reset password function,
  4. Social provider implementations with OAUTH2,
  5. Lightweight, and
  6. Hella easy to configure.

Dependencies & Credits to:

Social Login Resources:





Quick Install:

STEP 1 - Import the MySQL Structure:

Import the file: db.sql

STEP 2 - Modify index.php.

  1. Point to the right location (_HOME),
  2. Enter your MySQL database and table information,
  3. Configure your email (in $headers),
  4. Add your own template, html, and so on. I'll release another version that's prettier (eventually).

STEP 3 - Modify lib/hybridauth/config.php

  1. Decide which Social login providers you'd like to use, and get your credentials ready.
  2. Add with your OAUTH API access keys and secrets,
  3. Set ones you don't want to false if you don't intend on using certain providers (modify login.php to reflect this, too)
  4. For Google, be sure to enable the Google+ API.
  5. Be sure to turn your app to live within the Facebook, LinkedIn, and Google developers consoles.

Planned future improvements (Updated 12/20):

  • DONE  Bootstrap integration (done, just need to push to git)
  • DONE  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).


perm_identityAli Jaffar


visibility2249 reads


Did you enjoy this post?