Skip to content

[BUG]: Password visibility toggle has no auto-hide timeout β€” password stays visible indefinitely after clicking eye iconΒ #314

Description

@Git-Shubham14

πŸš€ Feature Request

πŸ“Œ Feature Description

Add a 3-second auto-hide security timeout to the password
visibility toggle β€” when the user clicks the eye icon to
reveal their password, it should automatically hide again
after 3 seconds for security.


❓ Problem Statement

The Sign Up and Sign In pages have a password visibility
toggle (eye icon) that reveals the password when clicked.
However once revealed, the password stays visible
indefinitely β€” there is no automatic timeout to re-hide it.

This is a security concern:

  • If a user reveals their password and walks away
    from their screen, anyone nearby can read it
  • No visual countdown or indication that the password
    will auto-hide
  • Industry best practice requires a short visibility
    window for security

πŸ’‘ Proposed Solution

  • When the eye icon is clicked to show the password,
    start a 3-second timer
  • After 3 seconds, automatically switch the field
    back to type="password" and reset the eye icon
  • Show a small countdown indicator (e.g. "Hiding in 3s")
    near the eye icon so the user is aware
  • If the user clicks the eye icon again before 3 seconds,
    cancel the timer and hide immediately

🎯 Benefits

  • Improves security by preventing shoulder-surfing
  • Matches security-conscious UX patterns used by
    banking and payment apps
  • Small focused change with meaningful security impact
  • No backend changes required

🌐 Additional Context

  • File to modify: frontend/scripts/auth.js
  • No backend changes required
  • Reproducible on live site:
    https://e-commerce-git-main-bhuvanshs-projects.vercel.app/signup.html
  • Steps to reproduce:
    1. Go to /signup.html
    2. Click the eye icon on the password field
    3. Observe β€” password stays visible with no
      auto-hide timeout
  • Reference: Banking apps, Google, GitHub all
    auto-hide passwords after a short timeout

Metadata

Metadata

Assignees

Labels

SSoC26Program label for Social Summer of Code Season 5.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions