Consolidate auth and patch flows: merge AuthGateway/OAuth into Login and PatchCheck into ClientLaunch
This commit is contained in:
@@ -3,29 +3,25 @@
|
|||||||
This file is the top-level map. Scene details now live in `context-files/scenes/*.scene.md`.
|
This file is the top-level map. Scene details now live in `context-files/scenes/*.scene.md`.
|
||||||
|
|
||||||
## Boot + Session
|
## Boot + Session
|
||||||
1. `ClientLaunch` → `scenes/client-launch.scene.md`
|
1. `ClientLaunch` (includes patch/version check) → `scenes/client-launch.scene.md`
|
||||||
2. `HubConnection` → `scenes/hub-connection.scene.md`
|
2. `HubConnection` → `scenes/hub-connection.scene.md`
|
||||||
3. `PatchAndVersionCheck` → `scenes/patch-and-version-check.scene.md`
|
|
||||||
4. `AuthGateway` → `scenes/auth-gateway.scene.md`
|
|
||||||
|
|
||||||
## Auth
|
## Auth
|
||||||
5. `Login` → `scenes/login.scene.md`
|
3. `Login` (includes session probe + OAuth start/callback flows) → `scenes/login.scene.md`
|
||||||
6. `Register` → `scenes/register.scene.md`
|
4. `Register` → `scenes/register.scene.md`
|
||||||
7. `OAuthStart` → `scenes/oauth-start.scene.md`
|
|
||||||
8. `OAuthCallback` → `scenes/oauth-callback.scene.md`
|
|
||||||
|
|
||||||
## Primary App
|
## Primary App
|
||||||
9. `MainMenu` → `scenes/main-menu.scene.md`
|
5. `MainMenu` → `scenes/main-menu.scene.md`
|
||||||
10. `Bazaar` → `scenes/bazaar.scene.md`
|
6. `Bazaar` → `scenes/bazaar.scene.md`
|
||||||
11. `Leaderboard` → `scenes/leaderboard.scene.md`
|
7. `Leaderboard` → `scenes/leaderboard.scene.md`
|
||||||
12. `Settings` → `scenes/settings.scene.md`
|
8. `Settings` → `scenes/settings.scene.md`
|
||||||
13. `AccountManagement` → `scenes/account-management.scene.md`
|
9. `AccountManagement` → `scenes/account-management.scene.md`
|
||||||
14. `CollectionHub` → `scenes/collection-hub.scene.md`
|
10. `CollectionHub` → `scenes/collection-hub.scene.md`
|
||||||
15. `RankedPlay` → `scenes/ranked-play.scene.md`
|
11. `RankedPlay` → `scenes/ranked-play.scene.md`
|
||||||
16. `CustomPlay` → `scenes/custom-play.scene.md`
|
12. `CustomPlay` → `scenes/custom-play.scene.md`
|
||||||
17. `DeckEditor` → `scenes/deck-editor.scene.md`
|
13. `DeckEditor` → `scenes/deck-editor.scene.md`
|
||||||
18. `CardViewer` → `scenes/card-viewer.scene.md`
|
14. `CardViewer` → `scenes/card-viewer.scene.md`
|
||||||
19. `Cosmetics` → `scenes/cosmetics.scene.md`
|
15. `Cosmetics` → `scenes/cosmetics.scene.md`
|
||||||
|
|
||||||
## Global Rules
|
## Global Rules
|
||||||
- Shared/global client rules are in `global.md`.
|
- Shared/global client rules are in `global.md`.
|
||||||
|
|||||||
@@ -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
|
- Splash/logo
|
||||||
- Build/version text
|
- Build/version text
|
||||||
- Background init indicator
|
- Background init indicator
|
||||||
|
- Version/patch status panel when update checks run
|
||||||
|
- Patch progress bar when updates are required
|
||||||
|
|
||||||
## Client
|
## Client
|
||||||
- Boot local config, device fingerprint, cached token state.
|
- Boot local config, device fingerprint, cached token state.
|
||||||
- Initialize telemetry/session id.
|
- 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
|
## 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)
|
||||||
|
|||||||
@@ -5,17 +5,43 @@
|
|||||||
- Password field
|
- Password field
|
||||||
- Remember device toggle
|
- Remember device toggle
|
||||||
- Submit + Forgot Password actions
|
- Submit + Forgot Password actions
|
||||||
|
- OAuth provider buttons (Google/Steam/Apple/Microsoft as enabled)
|
||||||
|
- Session check/loading indicator
|
||||||
|
- OAuth status text + callback verification state
|
||||||
|
|
||||||
## Client
|
## 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`.
|
- On success transition to `MainMenu`.
|
||||||
|
|
||||||
## Server
|
## 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
|
## Data Exchange
|
||||||
|
### Client -> Server (`SessionProbe`)
|
||||||
|
- `requestId`, `refreshToken` (optional), `deviceId`
|
||||||
|
|
||||||
|
### Server -> Client (`SessionProbeResult`)
|
||||||
|
- `requestId`, `isAuthenticated`, `accountId`, `displayName`
|
||||||
|
- `authMethodsAvailable`, `passwordPolicy`
|
||||||
|
|
||||||
### Client -> Server (`LoginRequest`)
|
### Client -> Server (`LoginRequest`)
|
||||||
- `requestId`, `emailOrUsername`, `password`, `deviceId`
|
- `requestId`, `emailOrUsername`, `password`, `deviceId`
|
||||||
|
|
||||||
### Server -> Client (`LoginResponse`)
|
### Server -> Client (`LoginResponse`)
|
||||||
- `requestId`, `success`, `accessToken`, `refreshToken`, `expiresAtUtc`, `accountSummary`, `errorCode`
|
- `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)
|
|
||||||
Reference in New Issue
Block a user