ietf-tools / ietf-tools/dev-planning-dispatch

Auth-state store + hydration + token refresh

Open
#58 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Status: ✅ Done.

Reactive auth state for the UI, plus session restore on load with no redirect and no flash of incorrect state.

  • app/stores/auth.ts is a Pinia store holding isAuthenticated and user. Both default to logged-out so that SSR and the first client paint render the anonymous view, and the logged-in state is applied only after mount.
  • Header.vue restores the session on load — gated on the oidc feature flag, in onMounted, client-only — via getUser(). Logged-in state is derived purely from the stored session, so an expired access token never reports the user as logged out. Crucially there is no redirect on page load; that was the requirement oidc-spa could not meet.
  • automaticSilentRenew together with the refresh token keeps the access token fresh in the background. On-demand refresh for authenticated API calls is provided separately by getAccessToken() (see the Pink-facing work).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue is marked done and names app/stores/auth.ts and Header.vue as the main entry points. Review the Pinia auth state, the onMounted getUser() session restore, the oidc feature-flag gate, and getAccessToken(); completion is the described hydration behavior, no redirect or flash on load, and background token renewal.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.