Skip to content

Auth stack, and how Discord roles and bans reach the app #42

Description

@vdvman1

Question

What is the auth stack, and how do Discord identity, roles, and bans reach the application?

Settled going in: better-auth with Discord OAuth. Membership of the MCC Discord guild is the gate for writing annotations. Discord roles and bans drive moderation. Reading is always public and never personalised — that is what keeps article pages cacheable. Whether to adopt better-convex (kitcn) is open.

Decide:

  • Adopt better-convex/kitcn, cherry-pick from it, or wire better-auth up directly? Informed by the research ticket.
  • How Convex verifies identity. Annotations are written client-side straight to Convex, so Convex must authenticate the caller itself. Pin down the mechanism and what ctx.auth sees.
  • Guild membership check. At sign-in only, or re-checked? What happens when someone leaves or is banned after signing in — is their session invalidated, are their existing annotations hidden?
  • Role sync. Which Discord roles map to which elevated capabilities (promoting a correction inline, resolving threads, deleting, forcing a refetch). Push from the bot, pull on demand, or snapshot at login? How stale can it be?
  • Ban sync. Same question, but the freshness bar is higher — a Discord ban should take effect quickly.
  • What the site stores about a user — Discord id, display name, avatar. Bear in mind annotations are public and permanent, and people change Discord usernames.
  • Sessions and the cached-page constraint. Nothing user-specific may leak into a cached article render. Confirm the chosen stack cannot accidentally make a page dynamic.

Blocked on the better-auth research. Produces the requirements the commanderbot-py change has to satisfy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:grillingWayfinder ticket: HITL conversation (default type)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions