Skip to content

fix: use env variable for redux persist encryption key and fix localStorage.clear in logout (Batch-3) - #413

Open
saurabhhhcodes wants to merge 1 commit into
pooranjoyb:masterfrom
saurabhhhcodes:fix/popShop-batch-3
Open

fix: use env variable for redux persist encryption key and fix localStorage.clear in logout (Batch-3)#413
saurabhhhcodes wants to merge 1 commit into
pooranjoyb:masterfrom
saurabhhhcodes:fix/popShop-batch-3

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Bugs Fixed

1. Hardcoded encryption key in store.ts

The Redux Persist encryption key was hardcoded as a string literal, with the env variable VITE_REDUX_PERSIST_SECRET_KEY commented out. This exposed the encryption key in the source code. Fixed by uncommenting the env variable and falling back to the hardcoded value only as a development default.

2. localStorage.clear() in authSlice.ts logout

Calling localStorage.clear() on logout wipes ALL locally stored data, including unrelated app state, user preferences, and cached data from other parts of the application. Fixed to only remove the Redux persist key instead of nuking the entire localStorage.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pop-shop Ready Ready Preview, Comment Jul 26, 2026 7:32pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant