Consolidate auth and patch flows: merge AuthGateway/OAuth into Login and PatchCheck into ClientLaunch

This commit is contained in:
dingo
2026-02-22 15:44:35 +00:00
parent f577b121fa
commit a7dc4e60e0
7 changed files with 57 additions and 107 deletions
@@ -1,22 +0,0 @@
# AuthGateway Scene
## UI
- Account/session check spinner
- Auth route chooser (Login/Register/OAuth)
- Service status banner
## Client
- Decide entry path: session refresh, login, register, OAuth.
- Render enabled options based on server capabilities.
## Server
- Validate refresh tokens and return session state.
- Provide auth policy.
## Data Exchange
### Client -> Server (`SessionProbe`)
- `requestId`, `refreshToken` (optional), `deviceId`
### Server -> Client (`SessionProbeResult`)
- `requestId`, `isAuthenticated`, `accountId`, `displayName`
- `authMethodsAvailable`, `passwordPolicy`
@@ -4,11 +4,24 @@
- Splash/logo
- Build/version text
- Background init indicator
- Version/patch status panel when update checks run
- Patch progress bar when updates are required
## Client
- Boot local config, device fingerprint, cached token state.
- Initialize telemetry/session id.
- Transition to `HubConnection`.
- Perform client/content version check during launch.
- If update required: show patch flow, apply update, and continue.
- If up-to-date: transition to `HubConnection`.
## Server
- None (local-only scene).
- Provide version support status and update manifest metadata.
## Data Exchange
### Client -> Server (`VersionStatusRequest`)
- `requestId`, `clientVersion`, `contentVersion`, `platform`
### Server -> Client (`VersionStatusResponse`)
- `requestId`, `isClientSupported`, `requiresClientUpdate`, `requiresContentUpdate`
- `minimumAllowedVersion`, `targetClientVersion`, `targetContentVersion`
- `updateManifestUrl`, `updateNotes` (optional), `blockReason` (if unsupported)
+28 -2
View File
@@ -5,17 +5,43 @@
- Password field
- Remember device toggle
- Submit + Forgot Password actions
- OAuth provider buttons (Google/Steam/Apple/Microsoft as enabled)
- Session check/loading indicator
- OAuth status text + callback verification state
## Client
- Submit account identifier + password.
- Perform session probe at scene entry.
- Decide path: existing session refresh, password login, or OAuth login.
- Start OAuth flow and handle OAuth callback exchange in this scene.
- On success transition to `MainMenu`.
## Server
- Validate credentials, enforce lockout and MFA if enabled.
- Validate refresh tokens and return auth policy.
- Validate credential login.
- Generate OAuth start URL/state and process OAuth exchange.
## Data Exchange
### Client -> Server (`SessionProbe`)
- `requestId`, `refreshToken` (optional), `deviceId`
### Server -> Client (`SessionProbeResult`)
- `requestId`, `isAuthenticated`, `accountId`, `displayName`
- `authMethodsAvailable`, `passwordPolicy`
### Client -> Server (`LoginRequest`)
- `requestId`, `emailOrUsername`, `password`, `deviceId`
### Server -> Client (`LoginResponse`)
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
### Client -> Server (`OAuthStartRequest`)
- `requestId`, `provider`, `returnUri`, `deviceId`
### Server -> Client (`OAuthStartResponse`)
- `requestId`, `authorizationUrl`, `state`, `codeVerifier` (if PKCE client-managed)
### Client -> Server (`OAuthExchangeRequest`)
- `requestId`, `provider`, `authorizationCode`, `state`, `codeVerifier`
### Server -> Client (`OAuthExchangeResponse`)
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
@@ -1,19 +0,0 @@
# OAuthCallback Scene
## UI
- Verifying auth state message
- Success/failure redirect panel
## Client
- Receive callback code/state and exchange with backend.
- On success transition to `MainMenu`.
## Server
- Exchange auth code with provider and bind/create game account.
## Data Exchange
### Client -> Server (`OAuthExchangeRequest`)
- `requestId`, `provider`, `authorizationCode`, `state`, `codeVerifier`
### Server -> Client (`OAuthExchangeResponse`)
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
@@ -1,19 +0,0 @@
# OAuthStart Scene
## UI
- Provider buttons
- OAuth status text
## Client
- Start OAuth flow with selected provider.
- Open provider auth URL.
## Server
- Generate signed OAuth start URL and anti-forgery state.
## Data Exchange
### Client -> Server (`OAuthStartRequest`)
- `requestId`, `provider`, `returnUri`, `deviceId`
### Server -> Client (`OAuthStartResponse`)
- `requestId`, `authorizationUrl`, `state`, `codeVerifier` (if PKCE client-managed)
@@ -1,25 +0,0 @@
# PatchAndVersionCheck Scene
## UI
- Version comparison summary
- Patch progress bar
- Release notes panel (optional)
- Continue button when ready
## Client
- Compare installed version/content against server-required values.
- If update needed: show patch status UI, download/apply, reconnect.
- If up-to-date: continue to `AuthGateway`.
## Server
- Provide update manifest and rollout policy.
- Enforce hard-block below minimum supported version.
## Data Exchange
### Client -> Server (`VersionStatusRequest`)
- `requestId`, `clientVersion`, `contentVersion`, `platform`
### Server -> Client (`VersionStatusResponse`)
- `requestId`, `isClientSupported`, `requiresClientUpdate`, `requiresContentUpdate`
- `minimumAllowedVersion`, `targetClientVersion`, `targetContentVersion`
- `updateManifestUrl`, `updateNotes` (optional), `blockReason` (if unsupported)