Skip to content

Repository files navigation

Project Auth

A PHP project on How to working a login registration authentication system with SQL and SQLite3 database using PDO.


Requirement

  1. PHP 8.3+ or later
  2. CSS/Lesscss
  3. JavaScript
  4. SQL/SQLite3
  5. composer v2.10

Features

  • CSRF protection token
  • Session and Cookie
  • Password hashing with bcrypt using password_hash() & password_verify() not by md5() or sha1().
  • OTP Verification
  • Caching for fast view rendering
  • Logs files (store errors files)

Setup

git clone https://github.com/codebysushil/login-registration.git
cd login-registration
composer setup

Start & run

composer serve

Tables

Create Users table.

CREATETABLEIF NOT EXISTS users (
id INTEGERPRIMARY KEY AUTOINCREMENT,
name TEXTNOT NULL,
email TEXTNOT NULL UNIQUE COLLATE NOCASE,
password_hash TEXTNOT NULL,
is_active INTEGERNOT NULL DEFAULT 1,
email_verified INTEGERNOT NULL DEFAULT 0,
last_login_at TEXT,
created_at TEXTNOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXTNOT NULL DEFAULT CURRENT_TIMESTAMP,
CHECK (is_active IN (0, 1)),
CHECK (email_verified IN (0, 1)),
CHECK (length(name) BETWEEN 1AND100)
);

About

Login Registration project

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages