Add a flag to disable writing AuthUser tokens to browser's local storage
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 431
- Forks
- 179
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 71
Description
Is your feature request related to a problem? Please describe.
The application stores the user's access token and ID token in local storage, which is not great, as any XSS vulnerability could lead to session hijacking.
Describe the solution you'd like
Add a server-side configuration flag to disable writing AuthUser tokens to browser's local storage. The default value is disable=false so it won't change existing behavior.
Describe alternatives you've considered
Additional context
The tokens are written to local storage by the code in src/lib/stores/auth-user.ts
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/lib/stores/auth-user.ts to trace how AuthUser tokens are written to browser local storage, then locate the server-side configuration entry point. Add a flag whose default is false and verify that enabling it prevents both tokens from being written while preserving existing behavior when disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100