Skip to content

[Feature] Add password protection for rooms #3

@kom50

Description

@kom50

Summary

Allow room creators to set a password that others must enter to join.

Requirements

  • Add "Set Password" option when creating room
  • Show password modal when joining protected room
  • Store hashed password on server
  • Validate password before allowing join
  • Show lock icon for protected rooms
  • Allow room owner to change/remove password

UI/UX

  • Password modal with input field and submit button
  • Show error message for incorrect password
  • Lock icon indicator in header for protected rooms
  • Toast notification on successful unlock

Technical Notes

// Server-side room structure
{
  id: "room-abc123",
  passwordHash: "bcrypt-hash", // null if not protected
  owner: "socket-id",
  content: "...",
  users: Map
}

Security Considerations

  • Use bcrypt for password hashing
  • Rate limit password attempts (max 5 per minute)
  • Clear password from memory after validation

Acceptance Criteria

  • Room creator can set optional password
  • Users must enter correct password to join
  • Incorrect password shows error, doesn't allow entry
  • Password can be changed by room owner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions