Skip to content

fix(security): remove plaintext password storage from client authentication - #87

Open
Akshu121796 wants to merge 2 commits into
jaideep005:mainfrom
Akshu121796:fix/remove-localstorage-password
Open

fix(security): remove plaintext password storage from client authentication#87
Akshu121796 wants to merge 2 commits into
jaideep005:mainfrom
Akshu121796:fix/remove-localstorage-password

Conversation

@Akshu121796

Copy link
Copy Markdown
Contributor

Summary

Closes #81

  • Linked the issue addressed by this PR
  • Targeted the correct base branch
  • Kept the changes scoped to a single issue
  • No UI screenshots required
  • Manually tested

What changed

  • Removed the client-side dependency on registeredPassword stored in localStorage.
  • Eliminated plaintext password retrieval and comparison from the login flow.
  • Updated the authentication flow to rely on the existing backend /api/auth/login endpoint.
  • Preserved the existing OTP verification and session handling after successful authentication.

Why this change is needed

Storing plaintext passwords in localStorage exposes sensitive credentials to XSS attacks and local browser access. This change removes that security risk by delegating credential validation to the backend while maintaining the existing user experience.

Testing

  • Not tested
  • Manually tested
  • Added/updated automated tests

Manual verification:

  • Registered password is no longer stored in localStorage.
  • Login succeeds through the backend authentication endpoint.
  • Invalid credentials are rejected.
  • OTP flow and session creation continue to work as expected.

Screenshots

N/A (security/backend change)

@Akshu121796

Copy link
Copy Markdown
Contributor Author

Heyy @jaideep005 ,
I have worked on issue #81
Please review it
If no changes , add the required labels, so it adds points to my profile
-type:security
-type:bug
-gssoc:approved
-backend (if available)

Thakyou so much for your support!!

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.

[SECURITY] Plaintext user credentials are stored in localStorage

1 participant