feat(portal): refine account identity controls
CI / validate (push) Successful in 4m51s
Release / release (push) Successful in 6m36s

This commit is contained in:
dmg
2026-08-01 18:06:30 -04:00
parent 86c87153b4
commit 19a5d04178
17 changed files with 357 additions and 43 deletions
+1
View File
@@ -2,6 +2,7 @@
## 2026-08-01
* **Refine**: Group repeated access networks, confirm linked Discord nickname changes before mutation, and add DMG Games sponsorship attribution.
* **Extend**: Add shared Pino logging with credential redaction and actionable web and Discord runtime diagnostics.
* **Fix**: Build magic-link redirects from the configured public portal URL instead of the reverse proxy's internal request origin.
* **Verify**: Confirmed `v1.1.1` left all pre-existing `latest` digests unchanged while publishing versioned artifacts.
+3 -1
View File
@@ -3,7 +3,7 @@ type: User Story
title: Enter the account portal through Discord
description: Direct visitors are guided to the configured Discord community and its account commands.
tags: [player, portal, discord, onboarding]
timestamp: 2026-08-01T18:43:58Z
timestamp: 2026-08-01T22:04:17Z
story_id: US-001
status: verified
---
@@ -18,11 +18,13 @@ As a prospective player, I want the portal to direct me to the community Discord
- [x] Given a configured invite URL, when the visitor selects the join action, then the Discord invite opens in a new browser context.
- [x] Given a configured guild ID, when the visitor selects the app action, then a `discord://` guild link is opened.
- [x] Given an unauthenticated protected-page request, when authorization fails, then the visitor returns to the portal with prominent Discord instructions.
- [x] Every portal page credits Social Minecraft sponsorship by DMG Games and links to `https://dmg.games`.
# Implementation
- [`apps/web/src/app/page.tsx`](../apps/web/src/app/page.tsx)
- [`apps/web/src/lib/auth/user-session.ts`](../apps/web/src/lib/auth/user-session.ts)
- [`apps/web/src/components/site-footer.tsx`](../apps/web/src/components/site-footer.tsx)
- Configuration: `DISCORD_GUILD_ID`, `DISCORD_INVITE_URL`
# Validation
+3 -3
View File
@@ -3,7 +3,7 @@ type: User Story
title: Manage linked accounts from the dashboard
description: Authenticated users maintain their profile and active Java Edition accounts.
tags: [player, dashboard, minecraft, profile]
timestamp: 2026-08-01T18:43:58Z
timestamp: 2026-08-01T22:04:17Z
story_id: US-005
status: verified
---
@@ -20,7 +20,7 @@ As a registered player, I want to manage my profile and linked Minecraft account
- [x] The user can soft-remove an active account.
- [x] The user can choose exactly one active primary account.
- [x] Removing a primary account promotes another active account when one exists.
- [x] Name and primary changes show the expected Discord nickname and require confirmation.
- [x] Name and primary changes preview the expected Discord nickname and require explicit confirmation before either profile mutation occurs.
- [x] The dashboard shows recent portal and game IP observations with classification and available location.
- [x] The user can revoke the current session by signing out.
@@ -32,7 +32,7 @@ As a registered player, I want to manage my profile and linked Minecraft account
# Validation
Server actions verify the current session and constrain every account lookup by the authenticated user ID.
Server actions verify the current session, constrain every account lookup by the authenticated user ID, and require the explicit Discord confirmation field before name or primary-account mutations. Confirmation parsing is covered by [`apps/web/src/lib/dashboard-change-confirmation.test.ts`](../apps/web/src/lib/dashboard-change-confirmation.test.ts).
# Related Stories
+4 -1
View File
@@ -3,7 +3,7 @@ type: User Story
title: Enrich portal and game login IPs
description: Login audit events include cached approximate location and network intelligence from ProxyCheck.io.
tags: [security, network, audit, proxycheck]
timestamp: 2026-08-01T18:43:58Z
timestamp: 2026-08-01T22:04:17Z
story_id: US-007
status: verified
---
@@ -22,6 +22,7 @@ As an operator, I want portal and registered game logins enriched with network c
- [x] Unknown game accounts do not trigger paid ProxyCheck lookups.
- [x] Login events and IP observations retain the available classification and approximate location.
- [x] Users and administrators can see available location and classification in audit views.
- [x] Repeated access observations are summarized by IPv4 /24 or IPv6 /64 network with counts, sources, and latest activity.
# Implementation
@@ -34,6 +35,8 @@ As an operator, I want portal and registered game logins enriched with network c
- [`packages/network/test/proxycheck.test.ts`](../packages/network/test/proxycheck.test.ts)
- [`packages/network/test/client-ip.test.ts`](../packages/network/test/client-ip.test.ts)
- [`packages/network/test/address-groups.test.ts`](../packages/network/test/address-groups.test.ts)
- [`apps/web/src/lib/access-address-groups.test.ts`](../apps/web/src/lib/access-address-groups.test.ts)
# Related Stories