Checkpoint: Migration complète vers l'authentification locale avec email/mot de passe
✅ Modifications apportées : - Remplacement de l'authentification OAuth Manus par un système local - Ajout des champs email, password, emailVerified dans la table users - Implémentation du hashage des mots de passe avec bcrypt - Création des procédures auth.login et auth.register - Mise à jour du système de context pour utiliser JWT - Création des pages de connexion et d'inscription - Mise à jour de la page AdminUsers pour créer des utilisateurs avec mot de passe - Ajout de la protection des routes d'administration (vérification du rôle admin) ✅ Tests effectués : - Connexion avec email/mot de passe ✓ - Création d'utilisateurs via l'interface d'administration ✓ - Protection des routes (seuls les admins peuvent accéder au dashboard) ✓ - Redirection automatique après connexion ✓ Note : Les fichiers OAuth Manus originaux ont été conservés pour référence mais ne sont plus utilisés.
This commit is contained in:
9
.manus/db/db-query-1763546134103.json
Normal file
9
.manus/db/db-query-1763546134103.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "UPDATE users \nSET password = '$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK',\n role = 'admin',\n emailVerified = TRUE\nWHERE email = 'o.pareige@itinova.org';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute UPDATE users \nSET password = '$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK',\n role = 'admin',\n emailVerified = TRUE\nWHERE email = 'o.pareige@itinova.org';",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 414
|
||||
}
|
||||
19
.manus/db/db-query-1763546215617.json
Normal file
19
.manus/db/db-query-1763546215617.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"query": "SELECT id, email, name, role, password, emailVerified, isActive FROM users WHERE email = 'o.pareige@itinova.org';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT id, email, name, role, password, emailVerified, isActive FROM users WHERE email = 'o.pareige@itinova.org';",
|
||||
"rows": [
|
||||
{
|
||||
"id": "1",
|
||||
"email": "o.pareige@itinova.org",
|
||||
"name": "olivier pareige",
|
||||
"role": "admin",
|
||||
"password": "$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK",
|
||||
"emailVerified": "1",
|
||||
"isActive": "1"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "id\temail\tname\trole\tpassword\temailVerified\tisActive\n1\to.pareige@itinova.org\tolivier pareige\tadmin\t$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK\t1\t1\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 49
|
||||
}
|
||||
9
.manus/db/db-query-1763546239968.json
Normal file
9
.manus/db/db-query-1763546239968.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "DELETE FROM users WHERE email = 'o.pareige@itinova.org';\n\nINSERT INTO users (email, password, name, role, emailVerified, isActive, createdAt, updatedAt, lastSignedIn)\nVALUES (\n 'o.pareige@itinova.org',\n '$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK',\n 'Olivier Pareige',\n 'admin',\n 1,\n 1,\n NOW(),\n NOW(),\n NOW()\n);",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute DELETE FROM users WHERE email = 'o.pareige@itinova.org';\n\nINSERT INTO users (email, password, name, role, emailVerified, isActive, createdAt, updatedAt, lastSignedIn)\nVALUES (\n 'o.pareige@itinova.org',\n '$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK',\n 'Olivier Pareige',\n 'admin',\n 1,\n 1,\n NOW(),\n NOW(),\n NOW()\n);",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 71
|
||||
}
|
||||
16
.manus/db/db-query-1763546569851.json
Normal file
16
.manus/db/db-query-1763546569851.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"query": "SELECT id, email, password, LENGTH(password) as password_length FROM users WHERE email = 'o.pareige@itinova.org';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT id, email, password, LENGTH(password) as password_length FROM users WHERE email = 'o.pareige@itinova.org';",
|
||||
"rows": [
|
||||
{
|
||||
"id": "2010001",
|
||||
"email": "o.pareige@itinova.org",
|
||||
"password": "$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK",
|
||||
"password_length": "60"
|
||||
}
|
||||
],
|
||||
"messages": [],
|
||||
"stdout": "id\temail\tpassword\tpassword_length\n2010001\to.pareige@itinova.org\t$2b$10$N9qo8uLOickgx2ZMRZoMye7FRNv8va91kpMQH6.OfzrcBizxDbvSK\t60\n",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 141
|
||||
}
|
||||
9
.manus/db/db-query-1763546726252.json
Normal file
9
.manus/db/db-query-1763546726252.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"query": "UPDATE users SET password = '$2b$10$wtfrg13y5qw/VZKdQfcs4epTfZT2Hje5eomHggJEfSLp9m9ZGlk2O' WHERE email = 'o.pareige@itinova.org';",
|
||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute UPDATE users SET password = '$2b$10$wtfrg13y5qw/VZKdQfcs4epTfZT2Hje5eomHggJEfSLp9m9ZGlk2O' WHERE email = 'o.pareige@itinova.org';",
|
||||
"rows": [],
|
||||
"messages": [],
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"execution_time_ms": 58
|
||||
}
|
||||
Reference in New Issue
Block a user