feat(auth): estrategia multicanal (WebControl + Google/Facebook + MariaDB Staff) y rediseño de login con mascota bot

This commit is contained in:
2026-10-20 15:35:43 -05:00
parent 72ce6adc12
commit f7cfccefa8
11 changed files with 694 additions and 133 deletions
+10
View File
@@ -62,6 +62,16 @@ async function setup() {
await migrateColumn('users', 'invite_token', 'invite_token VARCHAR(100) NULL');
await migrateColumn('users', 'invite_token_expires', 'invite_token_expires TIMESTAMP NULL');
await migrateColumn('users', 'invited_by', 'invited_by INT NULL');
await migrateColumn('users', 'provider', "provider ENUM('local', 'webcontrol', 'google', 'facebook') DEFAULT 'local'");
await migrateColumn('users', 'provider_id', "provider_id VARCHAR(150) NULL");
await migrateColumn('users', 'avatar_url', "avatar_url VARCHAR(255) NULL");
try {
await conn.query("ALTER TABLE users MODIFY COLUMN password VARCHAR(255) NULL");
console.log(' + users.password modificado a nullable');
} catch (e) {
// Ignorar si ya es nullable
}
// Alter users.rol to include superadmin
try {