You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4581411
Browse filesBrowse the repository at this point in the historyBrowse files
Let branch previews sign in with Discord through dev (#154)
* Let branch previews sign in with Discord through dev
Discord only returns players to registered callbacks, so a preview at
<slug>.tfminecraft.net could not sign anyone in. Previews now send the
browser to dev, which signs the player in (or uses its existing session)
and returns them with a single-use, 120-second ticket. The preview
redeems it with dev for the Discord identity, website role and guild
check, then opens its own session. Previews hold no Discord secret.
Dev needs PREVIEW_SIGN_IN_DOMAIN=tfminecraft.net; preview images get
SIGN_IN_SITE=https://dev.tfminecraft.net at build time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Close the gaps Astra found in preview sign-in
- Drop preview start and callback queries from access logs, so a logged
ticket cannot be redeemed by someone reading the logs.
- When dev's bot cannot refresh a guild check over 15 minutes old, sign
in with Discord again instead of handing the preview a stale check
that linking would refuse, in a loop.
- Refuse malformed preview origins instead of failing with a 500.
- Say in the Preview summary that sign-in goes through dev.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Get a fresh membership answer when a preview asks to check again
"I've joined, check again" on a preview signs in through dev again. With
dev's bot unable to answer, dev handed back the recent "not a member"
check, so the button did nothing for up to 15 minutes. A preview that
already has a session now asks dev for a recheck, and dev then signs
in with Discord once (the saved return drops the recheck, so it ends).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments