Merge hub connection flow into login scene
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
# HubConnection Scene
|
||||
|
||||
## UI
|
||||
- Connection status indicator (connecting/retrying/failed)
|
||||
- Retry button + diagnostics link (optional)
|
||||
|
||||
## Client
|
||||
- Open relay/hub socket.
|
||||
- Send initial hello with client build + platform metadata.
|
||||
- Wait for connection acceptance and service availability.
|
||||
|
||||
## Server
|
||||
- Validate protocol version compatibility.
|
||||
- Return environment capabilities and endpoint map.
|
||||
- Return maintenance/degraded status if active.
|
||||
|
||||
## Data Exchange
|
||||
### Client -> Server (`HubHello`)
|
||||
- `requestId`, `clientVersion`, `contentVersion`, `platform`, `locale`, `deviceId`, `sessionId`
|
||||
|
||||
### Server -> Client (`HubWelcome`)
|
||||
- `requestId`, `connectionId`
|
||||
- `minSupportedClientVersion`, `latestClientVersion`, `latestContentVersion`
|
||||
- `serviceStatus`, `apiBaseUrl`, `cdnBaseUrl`
|
||||
- `authProvidersEnabled`, `motd` (optional)
|
||||
@@ -1,6 +1,8 @@
|
||||
# Login Scene
|
||||
|
||||
## UI
|
||||
- Connection status indicator (connecting/retrying/failed)
|
||||
- Retry action + diagnostics link (optional)
|
||||
- Username/email field
|
||||
- Password field
|
||||
- Remember device toggle
|
||||
@@ -10,17 +12,31 @@
|
||||
- OAuth status text + callback verification state
|
||||
|
||||
## Client
|
||||
- Perform session probe at scene entry.
|
||||
- Open hub/relay connection in this scene.
|
||||
- Send initial hello with client build/platform metadata.
|
||||
- Wait for connection acceptance and service availability.
|
||||
- Perform session probe after connection is established.
|
||||
- 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 protocol compatibility and return environment capabilities.
|
||||
- Return service status.
|
||||
- Validate refresh tokens and return auth policy.
|
||||
- Validate credential login.
|
||||
- Generate OAuth start URL/state and process OAuth exchange.
|
||||
|
||||
## Data Exchange
|
||||
### Client -> Server (`HubHello`)
|
||||
- `requestId`, `clientVersion`, `contentVersion`, `platform`, `locale`, `deviceId`, `sessionId`
|
||||
|
||||
### Server -> Client (`HubWelcome`)
|
||||
- `requestId`, `connectionId`
|
||||
- `minSupportedClientVersion`, `latestClientVersion`, `latestContentVersion`
|
||||
- `serviceStatus`, `apiBaseUrl`, `cdnBaseUrl`
|
||||
- `authProvidersEnabled`, `motd` (optional)
|
||||
|
||||
### Client -> Server (`SessionProbe`)
|
||||
- `requestId`, `refreshToken` (optional), `deviceId`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user