mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-20 21:49:07 +02:00
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:
1 parent
7e6dccfadf
commit
6a863cdaf2
2 files changed
+170
-2
No files matched your search
+7
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user