basic php project setup with auth
  • PHP 99.5%
  • CSS 0.2%
  • PowerShell 0.2%
Find a file
2026-06-01 06:51:10 +02:00
cron fixed check login, login and session clean up 2026-05-24 15:24:27 +02:00
pages fix: missing csrf validation, listen to verfication email send success 2026-05-25 15:17:49 +02:00
public email verification working 2026-05-25 10:52:09 +02:00
utils check if email is verified when visiting secret, offer to send a new verification email 2026-05-25 15:13:34 +02:00
.gitignore first commit 2026-05-24 12:14:05 +02:00
_flash_message.php improve error handling 2026-05-25 08:23:21 +02:00
_footer.php first commit 2026-05-24 12:14:05 +02:00
_header.php check if email of user is verfied when looking at secret data 2026-05-25 13:54:34 +02:00
bootstrap.php attempting to store verification token in db 2026-05-25 09:57:09 +02:00
LICENSE default without file ending 2026-05-25 15:33:25 +02:00
php.ini fix: get the domain from the config file 2026-05-25 10:58:57 +02:00
README.md added issue 2026-06-01 06:51:10 +02:00
run-locally.ps1 first commit 2026-05-24 12:14:05 +02:00

PHP Auth Template

Basic PHP application with self-rolled auth 😱 . It has no dependencies, no node, no npm packages, no tailwind. Just PHP, HTML, CSS, JavaScript and Sqlite. It is written with the goal of minimizing maintenance work and to just be thrown on a webspace and provide decent performance.

Disclaimer

While I am a software developer I am not a security expert. This code has neither been peer-reviewed (message me if you did so and found something) nor audited. Use with caution and at your own risk.

TODOs

near-term

  • Basic Auth with DB session → done
  • Validate email address → done
  • Reset password via email

long-term

  • Organisations
  • Login with Google
  • Login with Apple

Known Issues

  • When there is an active session key but no session in the table an error is thrown
  • Error message is presented to the user when the mailer is not running (in dev on Windows 11)

Dev Setup

Windows 11

  • use run-locally.ps1 to run locally
  • use mailpit for mocking email