feat: enable Log In and add the email service #8

Merged
rcsheets merged 2 commits from feat/login-and-email into main 2026-10-24 23:48:32 +00:00
Owner

Enables Log In on brooktrails.org and lists the new email offering. Requires brooktrails/infra#445 to be merged and reconciled first, because that PR provides /oauth2/*.

Changes

  • Header: Log In is now a link to /oauth2/start?rd=/. When /oauth2/userinfo reports a session, the header shows the username and Log Out in place of Sign Up and Log In. Log Out goes through Keycloak's end-session endpoint, so the next Log In prompts for credentials again.
  • Resources: an entry can now have a member variant tied to a Keycloak group. Email links to https://webmail.brooktrails.org (MXroute branded webmail) for members of /email-users. Everyone else, anonymous or signed in, gets /email.html. This only decides which link to show; it is not access control.
  • email.html: what the service is, who can get it, how to reach webmail, mail-app settings (mail.brooktrails.org), and that MXroute hosts the mail.
  • Privacy policy: the session cookie set at sign-in, MXroute as the mail host, and MXroute's metadata logging.
  • Links to pages on this site now open in the same tab; external links still open in a new tab.

Before release

mail.brooktrails.org and webmail.brooktrails.org are MXroute custom hostnames, added in infra#445. Both should work without certificate errors before this ships, because the explainer page sends mail apps to mail.brooktrails.org.

Verification

The page was rendered in jsdom with a mocked /oauth2/userinfo for three cases: anonymous, signed in without the group, and signed in with /email-users. Each case showed the expected header and Email link. Not yet tested against the live oauth2-proxy.

🤖 Generated with Claude Code

Enables Log In on brooktrails.org and lists the new email offering. Requires brooktrails/infra#445 to be merged and reconciled first, because that PR provides `/oauth2/*`. ## Changes - **Header**: Log In is now a link to `/oauth2/start?rd=/`. When `/oauth2/userinfo` reports a session, the header shows the username and Log Out in place of Sign Up and Log In. Log Out goes through Keycloak's end-session endpoint, so the next Log In prompts for credentials again. - **Resources**: an entry can now have a `member` variant tied to a Keycloak group. **Email** links to `https://webmail.brooktrails.org` (MXroute branded webmail) for members of `/email-users`. Everyone else, anonymous or signed in, gets `/email.html`. This only decides which link to show; it is not access control. - **`email.html`**: what the service is, who can get it, how to reach webmail, mail-app settings (`mail.brooktrails.org`), and that MXroute hosts the mail. - **Privacy policy**: the session cookie set at sign-in, MXroute as the mail host, and MXroute's metadata logging. - Links to pages on this site now open in the same tab; external links still open in a new tab. ## Before release `mail.brooktrails.org` and `webmail.brooktrails.org` are MXroute custom hostnames, added in infra#445. Both should work without certificate errors before this ships, because the explainer page sends mail apps to `mail.brooktrails.org`. ## Verification The page was rendered in jsdom with a mocked `/oauth2/userinfo` for three cases: anonymous, signed in without the group, and signed in with `/email-users`. Each case showed the expected header and Email link. Not yet tested against the live oauth2-proxy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Log In / Log Out go through oauth2-proxy at /oauth2/* on the apex
  (infra: apps/brooktrails-web). The page probes /oauth2/userinfo and,
  when signed in, shows the username and Log Out in place of Sign Up and
  Log In. Log Out also ends the Keycloak session.
- Resources can now carry a member variant keyed on a Keycloak group.
  Email links to https://mail.brooktrails.org for /email-users members
  and to the new /email.html explainer for everyone else.
- Privacy policy: the sign-in session cookie, and MXroute as the mail
  host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Webmail is https://webmail.brooktrails.org (MXroute branded webmail);
mail apps use mail.brooktrails.org for IMAP/SMTP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rcsheets deleted branch feat/login-and-email 2026-10-24 23:48:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brooktrails/brooktrails-web!8
No description provided.