[GH#577] [MVP Task 14] Wire app routing/startup gate for login flow #4

Open
opened 2026-05-19 22:15:17 +02:00 by Max · 0 comments
Owner

Migrated from GitHub #577
Originally created by @Bio1988 on 2026-05-18T10:57:11Z


Phase 3, Task 14

Plan: docs/plans/2026-05-18-teammanager-iracing-login-mvp.md in Bio1988/strategy-desktop.

Depends on: #576
Server dependency: Bio1988/teammanager-server#11

Product decisions from Max (2026-05-18)

  • IRACING_CLIENT_SECRET, iRacing username/client identifier data, and IRACING_REDIRECT_URI will be provided as GitHub Secrets / deployment environment, not hard-coded.
  • Redirect URI is dynamic via env/secret so production and later variants can be changed without code changes.
  • DNS for api.teammanager.cc is still pending.
  • Desktop must never store OAuth access/refresh tokens. Use a random per-install pairing token locally; store OAuth tokens and pairing mapping in the server database.
  • No separate token-refresh cron/goroutine for MVP. Refresh opportunistically when users interact / before API calls; mark expired only when refresh fails.
  • IRACING_USERNAME is not required by the server and must not be part of required config.

Objective

Update App.tsx startup flow to show LoginPage when no connection/skip state is present.

Scope

See plan task details; adjust implementation to the product decisions above.

Acceptance criteria

  • App checks connection status on startup.
  • Connected or skipped users reach normal app.
  • Unauthenticated users see LoginPage first.
  • Skip/connection state persists appropriately without storing OAuth tokens.

Notes

  • Keep race-critical logic local; this is sync/team integration only.
  • Desktop stores only a random pairing token / connection metadata, never iRacing OAuth tokens.

Parent: #573

Migrated from [GitHub #577](https://github.com/Bio1988/strategy-desktop/issues/577) Originally created by @Bio1988 on 2026-05-18T10:57:11Z --- ## Phase 3, Task 14 Plan: `docs/plans/2026-05-18-teammanager-iracing-login-mvp.md` in `Bio1988/strategy-desktop`. Depends on: #576 Server dependency: Bio1988/teammanager-server#11 ## Product decisions from Max (2026-05-18) - `IRACING_CLIENT_SECRET`, iRacing username/client identifier data, and `IRACING_REDIRECT_URI` will be provided as GitHub Secrets / deployment environment, not hard-coded. - Redirect URI is dynamic via env/secret so production and later variants can be changed without code changes. - DNS for `api.teammanager.cc` is still pending. - Desktop must never store OAuth access/refresh tokens. Use a random per-install pairing token locally; store OAuth tokens and pairing mapping in the server database. - No separate token-refresh cron/goroutine for MVP. Refresh opportunistically when users interact / before API calls; mark expired only when refresh fails. - `IRACING_USERNAME` is not required by the server and must not be part of required config. ## Objective Update `App.tsx` startup flow to show LoginPage when no connection/skip state is present. ## Scope See plan task details; adjust implementation to the product decisions above. ## Acceptance criteria - App checks connection status on startup. - Connected or skipped users reach normal app. - Unauthenticated users see LoginPage first. - Skip/connection state persists appropriately without storing OAuth tokens. ## Notes - Keep race-critical logic local; this is sync/team integration only. - Desktop stores only a random pairing token / connection metadata, never iRacing OAuth tokens. Parent: #573
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Max/strategy-desktop#4
No description provided.