ThaiGust Enterprise Setup
Authentication & Access Control Deployment Guide
1
Create Super Admin in Supabase Auth
- Go to
Supabase Dashboard → Authentication → Users - Click
Add User - Enter Email:
thaientour@gmail.com - Generate strong password (16+ chars: uppercase, lowercase, numbers, special)
- ⚠️ CRITICAL: Save password in secure location only. Never commit to code.
2
Set Super Admin Role in User Entity
- In Base44 Admin Panel, go to
Entities → User - Find user with email:
thaientour@gmail.com - Update
rolefield to:super_admin - Set
is_activeto:true - Save changes
3
Enable 2FA for Super Admin (CRITICAL)
🔴 MANDATORY SECURITY STEP
Super Admin account MUST have 2FA enabled before any other user access.
Option A: Email OTP (Recommended)
- ✓ Supabase sends OTP codes via email
- ✓ No additional app needed
- ✓ Fast setup
Option B: Authenticator App (Extra Security)
- ✓ Use Google Authenticator, Microsoft Authenticator, or Authy
- ✓ Generate TOTP codes locally
- ✓ Store backup codes in vault
4
First Login & Password Reset
- Super Admin goes to login page
- Login with
thaientour@gmail.com - Complete 2FA verification (email OTP or authenticator)
- Go to
/admin/settings/security - Change password to a NEW strong password
- Original setup password should be discarded
Security Checklist
✅ Super Admin created in Supabase Auth
✅ Role set to "super_admin" in User entity
✅ 2FA enabled for super admin account
✅ Original password discarded (never reused)
✅ New strong password set
✅ First login completed
✅ Admin panel routes protected
✅ RLS policies enabled
📋 Next Steps
- Step 2: Admin Panel Route Protection
- Step 3: Invitation System (backend function)
- Step 4: Public Signup Restrictions
- Step 5: Admin User Management UI
- Step 6: Audit Logging System
