ThaiGust Enterprise Setup

Authentication & Access Control Deployment Guide

1

Create Super Admin in Supabase Auth

  1. Go to Supabase Dashboard → Authentication → Users
  2. Click Add User
  3. Enter Email: thaientour@gmail.com
  4. Generate strong password (16+ chars: uppercase, lowercase, numbers, special)
  5. ⚠️ CRITICAL: Save password in secure location only. Never commit to code.
2

Set Super Admin Role in User Entity

  1. In Base44 Admin Panel, go to Entities → User
  2. Find user with email: thaientour@gmail.com
  3. Update role field to: super_admin
  4. Set is_active to: true
  5. 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

  1. Super Admin goes to login page
  2. Login with thaientour@gmail.com
  3. Complete 2FA verification (email OTP or authenticator)
  4. Go to /admin/settings/security
  5. Change password to a NEW strong password
  6. 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

  1. Step 2: Admin Panel Route Protection
  2. Step 3: Invitation System (backend function)
  3. Step 4: Public Signup Restrictions
  4. Step 5: Admin User Management UI
  5. Step 6: Audit Logging System

Your Thailand Trip

Your trip is empty

Add attractions to start planning