You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.3 KiB
Markdown

+++
title = "[TRIAGE] Auth code storage strategy — localStorage persistence vs component-only state?"
priority = 7
status = "todo"
ticket_type = "task"
dependencies = ["c3503b"]
+++
<context>
This is a triage decision ticket. It must be resolved before dependent implementation tickets can proceed.
</context>
<question>
Auth code storage strategy for the UI: should the auth code be stored in localStorage (persisted across sessions) or kept only in component state (lost on page reload)?
</question>
<options>
1. **Component state only** — auth code is lost on page reload. User must re-enter it each time. Simpler and more secure.
2. **localStorage per quote ID** — store `auth_code_{id}` in localStorage so the user doesn't need to re-enter it for quotes they created. Risk: plaintext in localStorage.
3. **Session storage** — same as localStorage but cleared when the tab closes. Middle ground.
</options>
<resolution>
1. Research the options above and choose the best approach for this project.
2. Update the `AuthModal` component (ticket f850c6) with the chosen strategy. If localStorage is chosen, implement a clear-on-delete path.
3. Mark this ticket done with a note on the chosen approach in the body or a comment.
</resolution>
<commit>
`chore(quotesdb): resolve triage — auth-code-storage-strategy-localstorage-persistence-vs-compo`
</commit>