Prettier format pending files

This commit is contained in:
Builder.io 2025-11-10 22:31:21 +00:00
parent 9a8118a892
commit bd2aeaae43

View file

@ -9,9 +9,11 @@
## What Should Work ## What Should Work
### ✅ 1. Login with Discord (New Scenario) ### ✅ 1. Login with Discord (New Scenario)
**Scenario**: User clicks "Continue with Discord" on `/login` with Discord email matching existing account **Scenario**: User clicks "Continue with Discord" on `/login` with Discord email matching existing account
**Steps**: **Steps**:
1. Go to `https://aethex.dev/login` 1. Go to `https://aethex.dev/login`
2. Click **"Continue with Discord"** button 2. Click **"Continue with Discord"** button
3. Authorize on Discord 3. Authorize on Discord
@ -22,9 +24,11 @@
--- ---
### ✅ 2. Login with Discord (Email Mismatch) ### ✅ 2. Login with Discord (Email Mismatch)
**Scenario**: Discord email doesn't match any existing AeThex account **Scenario**: Discord email doesn't match any existing AeThex account
**Steps**: **Steps**:
1. Go to `https://aethex.dev/login` 1. Go to `https://aethex.dev/login`
2. Click **"Continue with Discord"** button 2. Click **"Continue with Discord"** button
3. Authorize with Discord account that has different email 3. Authorize with Discord account that has different email
@ -36,9 +40,11 @@
--- ---
### ✅ 3. Link Discord from Dashboard ### ✅ 3. Link Discord from Dashboard
**Scenario**: User already logged in, wants to link Discord **Scenario**: User already logged in, wants to link Discord
**Steps**: **Steps**:
1. Sign in with email/password on `/login` 1. Sign in with email/password on `/login`
2. Go to `/dashboard?tab=connections` 2. Go to `/dashboard?tab=connections`
3. Find Discord card 3. Find Discord card
@ -51,9 +57,11 @@
--- ---
### ✅ 4. Discord Bot Commands ### ✅ 4. Discord Bot Commands
**Scenario**: User types Discord commands in a server where bot is present **Scenario**: User types Discord commands in a server where bot is present
**Commands to Test**: **Commands to Test**:
``` ```
/verify - Bot sends verification code /verify - Bot sends verification code
/set-realm gameforge - Bot confirms realm change + assigns role /set-realm gameforge - Bot confirms realm change + assigns role
@ -121,15 +129,18 @@ DISCORD_PUBLIC_KEY=d9771dd29e3a6f030cb313e33bb4b51384c7c36829bd551df714681dcf1e1
Make sure these are configured in Discord Developer Portal: Make sure these are configured in Discord Developer Portal:
- [ ] **General Information**: - [ ] **General Information**:
- [ ] Application name: "AeThex" - [ ] Application name: "AeThex"
- [ ] Client ID: `578971245454950421` - [ ] Client ID: `578971245454950421`
- [ ] Public Key: `d9771dd29e3a6f030cb313e33bb4b51384c7c36829bd551df714681dcf1e1eb0` - [ ] Public Key: `d9771dd29e3a6f030cb313e33bb4b51384c7c36829bd551df714681dcf1e1eb0`
- [ ] **OAuth2 > General**: - [ ] **OAuth2 > General**:
- [ ] Client Secret configured - [ ] Client Secret configured
- [ ] Redirect URIs includes: `https://aethex.dev/api/discord/oauth/callback` - [ ] Redirect URIs includes: `https://aethex.dev/api/discord/oauth/callback`
- [ ] **Bot**: - [ ] **Bot**:
- [ ] Bot token set (new GmEHDt token) - [ ] Bot token set (new GmEHDt token)
- [ ] Intents enabled: `Message Content`, `Guilds` - [ ] Intents enabled: `Message Content`, `Guilds`
- [ ] Permissions: `Administrator` or specific permissions - [ ] Permissions: `Administrator` or specific permissions
@ -143,12 +154,15 @@ Make sure these are configured in Discord Developer Portal:
## Testing Checklist ## Testing Checklist
### Basic Connectivity ### Basic Connectivity
- [ ] API endpoint responds: `curl https://aethex.dev/api/discord/oauth/start -I` - [ ] API endpoint responds: `curl https://aethex.dev/api/discord/oauth/start -I`
- [ ] Discord bot online (shows in server member list) - [ ] Discord bot online (shows in server member list)
- [ ] Discord bot can execute commands (`/verify` works) - [ ] Discord bot can execute commands (`/verify` works)
### OAuth Login Tests ### OAuth Login Tests
- [ ] **Test 1**: Login with Discord email matching existing account - [ ] **Test 1**: Login with Discord email matching existing account
- [ ] Click "Continue with Discord" - [ ] Click "Continue with Discord"
- [ ] Authorize - [ ] Authorize
- [ ] Redirects to dashboard ✅ - [ ] Redirects to dashboard ✅
@ -160,7 +174,9 @@ Make sure these are configured in Discord Developer Portal:
- [ ] Can sign in with email instead ✅ - [ ] Can sign in with email instead ✅
### OAuth Linking Tests ### OAuth Linking Tests
- [ ] **Test 3**: Link Discord from Dashboard - [ ] **Test 3**: Link Discord from Dashboard
- [ ] Sign in with email - [ ] Sign in with email
- [ ] Go to Dashboard → Connections - [ ] Go to Dashboard → Connections
- [ ] Click "Link Discord" - [ ] Click "Link Discord"
@ -175,12 +191,15 @@ Make sure these are configured in Discord Developer Portal:
- [ ] Successfully re-linked ✅ - [ ] Successfully re-linked ✅
### Bot Command Tests ### Bot Command Tests
- [ ] **Test 5**: `/verify` command generates code - [ ] **Test 5**: `/verify` command generates code
- [ ] Type `/verify` in Discord - [ ] Type `/verify` in Discord
- [ ] Bot sends code with link - [ ] Bot sends code with link
- [ ] Link works: `https://aethex.dev/discord-verify?code=...` - [ ] Link works: `https://aethex.dev/discord-verify?code=...`
- [ ] **Test 6**: `/set-realm` command works - [ ] **Test 6**: `/set-realm` command works
- [ ] Type `/set-realm` - [ ] Type `/set-realm`
- [ ] Select an arm (gameforge, labs, etc) - [ ] Select an arm (gameforge, labs, etc)
- [ ] Bot confirms change ✅ - [ ] Bot confirms change ✅
@ -195,18 +214,22 @@ Make sure these are configured in Discord Developer Portal:
## Troubleshooting ## Troubleshooting
### "Redirect URI mismatch" error ### "Redirect URI mismatch" error
- Problem: Discord OAuth callback failing - Problem: Discord OAuth callback failing
- Solution: Verify `https://aethex.dev/api/discord/oauth/callback` is registered in Discord Developer Portal - Solution: Verify `https://aethex.dev/api/discord/oauth/callback` is registered in Discord Developer Portal
### "Invalid token" error ### "Invalid token" error
- Problem: Bot token expired or revoked - Problem: Bot token expired or revoked
- Solution: Get new token from Discord Developer Portal - Solution: Get new token from Discord Developer Portal
### Bot commands not working ### Bot commands not working
- Problem: Commands not registered with Discord - Problem: Commands not registered with Discord
- Solution: Run `/api/discord/admin-register-commands` endpoint with DISCORD_ADMIN_REGISTER_TOKEN - Solution: Run `/api/discord/admin-register-commands` endpoint with DISCORD_ADMIN_REGISTER_TOKEN
### Session lost during linking ### Session lost during linking
- Problem: User logged out after Discord OAuth redirect - Problem: User logged out after Discord OAuth redirect
- Solution: This should NOT happen anymore - we use database sessions instead of cookies - Solution: This should NOT happen anymore - we use database sessions instead of cookies
@ -222,4 +245,3 @@ All flows working when you see:
4. ✅ Bot commands work in Discord 4. ✅ Bot commands work in Discord
5. ✅ No session loss during OAuth redirects 5. ✅ No session loss during OAuth redirects
6. ✅ Helpful error messages when things go wrong 6. ✅ Helpful error messages when things go wrong