feat: grant Elysian role on auth and prompt non-members to join #134

Merged
naomi merged 5 commits from feat/role-and-cta into main 2026-03-24 18:49:51 -07:00
Owner

Summary

  • Grants the Elysian Discord role to players on login/registration and persists an inGuild flag on the Player record
  • Connects to the Discord Gateway via WebSocket to keep inGuild in sync as players join or leave the server
  • Shows a dismissible "Join our community" modal to players who are not yet in the guild
  • Hardens inGuild exposure through the load endpoint and game context
  • Moves all non-secret Discord IDs (guild, role, client, redirect URI) out of env vars and into hardcoded constants; removes them from prod.env

Test plan

  • Lint, build, and test pipeline passes (100% coverage maintained)
  • New player auth grants Elysian role and sets inGuild: true
  • Existing player auth re-attempts role grant and updates inGuild
  • Join community modal appears for players not in the guild
  • Modal does not reappear within the same browser session after dismissal
  • Gateway correctly sets inGuild: true/false on member add/remove events

This issue was created with help from Hikari~ 🌸

## Summary - Grants the Elysian Discord role to players on login/registration and persists an `inGuild` flag on the Player record - Connects to the Discord Gateway via WebSocket to keep `inGuild` in sync as players join or leave the server - Shows a dismissible "Join our community" modal to players who are not yet in the guild - Hardens `inGuild` exposure through the load endpoint and game context - Moves all non-secret Discord IDs (guild, role, client, redirect URI) out of env vars and into hardcoded constants; removes them from `prod.env` ## Test plan - [ ] Lint, build, and test pipeline passes (100% coverage maintained) - [ ] New player auth grants Elysian role and sets `inGuild: true` - [ ] Existing player auth re-attempts role grant and updates `inGuild` - [ ] Join community modal appears for players not in the guild - [ ] Modal does not reappear within the same browser session after dismissal - [ ] Gateway correctly sets `inGuild: true/false` on member add/remove events ✨ This issue was created with help from Hikari~ 🌸
hikari added 5 commits 2026-03-24 18:47:55 -07:00
- Grant Elysian Discord role to players on OAuth login (new and returning)
- Add inGuild flag to Player schema, seeded from role grant response
- Connect Discord Gateway WebSocket to keep inGuild in sync on join/leave
- Return inGuild from load endpoint; expose in game context
- Show join community modal once per session when inGuild is false
Move guild ID, apotheosis role ID, Discord client ID, and redirect URI
from env vars to hardcoded constants — none of these are secrets, and
hardcoding removes unnecessary runtime configuration surface. Update
tests to use the real IDs and drop now-irrelevant env var scenarios.
fix: correct Discord client ID constant
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m9s
CI / Lint, Build & Test (pull_request) Successful in 1m11s
e2c07f8b4c
naomi merged commit 6bf1ac5e7d into main 2026-03-24 18:49:51 -07:00
naomi deleted branch feat/role-and-cta 2026-03-24 18:49:52 -07:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#134