Add starter deck flow, admin force-logout + rename, shop flag

Auth chain:
- auth.proto: add needs_starter_deck to Login/Register/ValidateToken responses
- auth.proto: add RevokeAllSessions RPC
- AuthGrpcHandler: populate NeedsStarterDeck from Account.StarterDeckSelectedAt
- AuthGrpcHandler: track tokens in UserSessions Redis SET on create/logout
- AuthGrpcHandler: implement RevokeAllSessions (Redis + Postgres)
- IGatewayAuthValidator / GatewayAuthValidator: thread NeedsStarterDeck through tuples
- ConnectionLoop: include needsStarterDeck in auth ack payload

Client:
- Auth.gd: store needs_starter_deck from auth reply; clear on logout
- login_screen.gd: route to StarterDeckScreen when needs_starter_deck = true
- scenes/starter_deck/: new StarterDeckScreen (fetch decks → pick → confirm → InitScreen)

Admin panel:
- AccountDetail.razor: Force Logout All Sessions card (Redis + Postgres revoke)
- AccountDetail.razor: Change Display Name form with uniqueness check
- SOR.Admin: add StackExchange.Redis package + DI registration
- PrebuiltDeckEditor.razor: split into IsStarterDeck + IsAvailableInShop checkboxes
- PrebuiltDeck.cs: add IsAvailableInShop field
- Migration: AddPrebuiltDeckShopFlag

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-28 13:08:08 -05:00
co-authored by Claude Happy
parent fa8418387b
commit bdd6e59dfe
17 changed files with 1036 additions and 50 deletions
+6
View File
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using StackExchange.Redis;
using SOR.Admin;
using SOR.Admin.Components;
using SOR.Cdn;
@@ -71,6 +72,11 @@ builder.Services.AddIdentityCore<Account>(options =>
// ── Razor Pages (used for login/logout form posts) ─────────────────────────
builder.Services.AddRazorPages();
// ── Redis ──────────────────────────────────────────────────────────────────
builder.Services.AddSingleton<IConnectionMultiplexer>(_ =>
ConnectionMultiplexer.Connect(
builder.Configuration.GetConnectionString("Redis") ?? "localhost:6379"));
// ── CDN client ────────────────────────────────────────────────────────────
builder.Services.AddCdnClient(builder.Configuration);