Skip to content

Add Remember Me session storage for login#252

Open
gTanusri wants to merge 2 commits into
rdodiya:gssoc_developfrom
gTanusri:feature/issue-242-remember-me
Open

Add Remember Me session storage for login#252
gTanusri wants to merge 2 commits into
rdodiya:gssoc_developfrom
gTanusri:feature/issue-242-remember-me

Conversation

@gTanusri

@gTanusri gTanusri commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added a shared auth storage helper to support both persistent and session-only login.
  • Added a Remember Me checkbox on the login page.
  • Store auth tokens in localStorage when Remember Me is checked and sessionStorage when unchecked.
  • Applied the same storage behavior to Google login.
  • Updated protected routes, API interceptors, logout, and websocket notification requests to read and clear auth data from both storage locations.
  • Fixed a missing closing brace in ApiService.js that was preventing the frontend build from parsing.

Issue

Closes #242

Validation

  • npm run build passes
  • ./gradlew.bat compileJava passes
  • git diff --check passes

@rdodiya

rdodiya commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Hi @gTanusri,

The current implementation correctly stores authentication data in localStorage when Remember Me is checked and in sessionStorage otherwise.

One additional enhancement is needed:

  • If the user selects Remember Me, store the user's email/username in localStorage.
  • On subsequent visits to the Login page, automatically pre-populate the email/username input field from localStorage.
  • If Remember Me is unchecked, clear the stored email/username so it is not auto-filled on future visits.

This will provide a better user experience while keeping the existing authentication storage behavior unchanged.

@gTanusri

Copy link
Copy Markdown
Contributor Author

Hi @rdodiya, I've updated the PR with username pre-fill when Remember Me is checked, and it clears when unchecked.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Add "Remember Me" checkbox to login form

2 participants