Add user authentication with password hashing

- Integrated Argon2 for password hashing and verification
- Added bcrypt and thiserror dependencies
- Updated database schema with admin and ban flags
- Implemented user account creation and login logic
- Enhanced error handling for database operations
```
This commit is contained in:
Andrea Moro 2025-04-21 17:46:22 +02:00
parent ba22b22ecc
commit b98a890738
9 changed files with 278 additions and 10 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE users
ADD COLUMN is_admin BOOLEAN DEFAULT FALSE;

View file

@ -0,0 +1,5 @@
ALTER TABLE users
ADD COLUMN is_banned BOOLEAN DEFAULT FALSE;
ALTER TABLE users
ADD COLUMN ban_reason VARCHAR(255);