1.6 KiB
1.6 KiB
Login Scene
UI
- Username/email field
- 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
- 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 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,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