Add development-only in-memory storage and simplified admin login

Introduce an in-memory storage solution for development environments and simplify the admin login process with a hardcoded credential for easier testing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d396e5bd-e32d-4a20-9e7d-71e7102ddc6c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d396e5bd-e32d-4a20-9e7d-71e7102ddc6c/CrwFq15
This commit is contained in:
michaelschal committed 2025-08-11 15:03:19 +00:00
1 parent 7e6dccfadf
commit 6a863cdaf2
2 files changed
+170 -2

No files matched your search

+7 -1
View File
@@ -25,7 +25,13 @@ export async function hashPassword(password: string) {
async function comparePasswords(supplied: string, stored: string) {
console.log('🔐 comparePasswords:', { supplied: 'HIDDEN', stored: stored?.substring(0, 20) + '...', hasFormat: stored?.includes('.') });
// Vérifier le format du mot de passe stocké
// Simple password comparison for development (admin.salt format)
if (stored === 'admin.salt' && supplied === 'admin') {
console.log('🔐 Development auth: admin password accepted');
return true;
}
// Vérifier le format du mot de passe stocké pour production
if (!stored || !stored.includes('.')) {
console.error('❌ Invalid password format:', { stored });
return false;