mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-15 03:09:32 +02:00
Improve store data handling and user authentication for multiple stores
Update storage and authentication logic to support multiple stores, including specific configurations for "Magasin 1" and "Magasin 2", and add new development user credentials. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a3de0820-9397-41b2-b000-7931ee9c29de Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a3de0820-9397-41b2-b000-7931ee9c29de/mKF47ul
This commit is contained in:
1 parent
c6c9369fcb
commit
f21d807968
5 files changed
+240
-22
No files matched your search
+9
-1
@@ -25,11 +25,19 @@ 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('.') });
|
||||
|
||||
// Simple password comparison for development (admin.salt format)
|
||||
// Simple password comparison for development users
|
||||
if (stored === 'admin.salt' && supplied === 'admin') {
|
||||
console.log('🔐 Development auth: admin password accepted');
|
||||
return true;
|
||||
}
|
||||
if (stored === 'manager1.salt' && supplied === 'manager1') {
|
||||
console.log('🔐 Development auth: manager1 password accepted');
|
||||
return true;
|
||||
}
|
||||
if (stored === 'manager2.salt' && supplied === 'manager2') {
|
||||
console.log('🔐 Development auth: manager2 password accepted');
|
||||
return true;
|
||||
}
|
||||
|
||||
// Vérifier le format du mot de passe stocké pour production
|
||||
if (!stored || !stored.includes('.')) {
|
||||
|
||||
Reference in new issue
Block a user