Skip to content

Social logins, regular auth and password resets via email.

License

Notifications You must be signed in to change notification settings

lmbell89/authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authentication

Social logins, regular auth and password resets via email.

A working demo is available at https://liambell.info/portfolio/auth

Description

This PHP app allows authentication by users. Users can authenticate using a regular username and password or by signing in with Facebook or Google.

The logged in status of the user is stored in session using PHP's session_start.
Minimum password complexity is enforced. If a user has forgotten their password they can reset it, by receiving a password reset link to the email address they registered with.
User records are stored in SQL.

If a user attempts to access a page that requires them to be logged in, they will be directed back to the login screen.
If the user provides valid credentials they will be redirected back to the page they attempted to access.

Bootstrap is used to style the pages and form validation.
Some pages use a flash to show messages to the user.

Prerequisites

The project requires PHP 7.2+ with the PDO extension enabled.
SMTP is required to send password reset links via email.
SQL is required to store user records.
A Facebook app_id and Facebook app_secret. See https://developers.facebook.com/ for more information.
A Google client_id. See https://developers.google.com/identity for more information.

Configuration

Most details, such as SMTP and SQL details, need to be entered \config\config.php
The Facebook app_id and Google client_id must also be entered at the top of \public\login.js
The path to the autoload.php file for vendor is list at the top of \config\config.php

About

Social logins, regular auth and password resets via email.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published