2.5 KiB
2.5 KiB
Login Scene
UI
- Connection status indicator (connecting/retrying/failed)
- Retry action + diagnostics link (optional)
- Username/email field
- Password field
- Remember device toggle
- Submit + Forgot Password actions
Create Accountaction to openRegister- OAuth provider buttons (Google/Steam/Apple/Microsoft as enabled)
- Session check/loading indicator
- OAuth status text + callback verification state
Client
- 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.
- Route
Forgot Passwordto account recovery flow. - Route
Create AccounttoRegister. - 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,connectionIdminSupportedClientVersion,latestClientVersion,latestContentVersionserviceStatus,apiBaseUrl,cdnBaseUrlauthProvidersEnabled,motd(optional)
Client -> Server (SessionProbe)
requestId,refreshToken(optional),deviceId
Server -> Client (SessionProbeResult)
requestId,isAuthenticated,accountId,displayNameauthMethodsAvailable,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