Skip to content

Ensure Unique Usernames When Updating Profile Information  #311

@othbcq

Description

@othbcq

Overview

Our application supports two authentication methods:

  1. Email and Password: Users register with a unique username.
  2. Google Sign-In: Users are assigned their Google username, which they can later change in their profile.

Problem

Currently, while registration enforces unique usernames, updating usernames in the profile does not ensure uniqueness. This can lead to duplicate usernames, causing confusion and potential conflicts.

Requirements

  • Username Uniqueness Check:

    • When a user attempts to change their username in the profile, verify that the new username is not already taken.
  • Real-Time Feedback:

    • Provide immediate feedback if the desired username is unavailable.
    • Allow users to choose a different username if needed.
  • Consistent Enforcement:

    • Apply the uniqueness constraint for both authentication methods (Email/Password and Google Sign-In).
  • Backend Integration:

    • Update the repository to handle username updates with uniqueness checks.
  • Testing:

    • Add unit and integration tests to ensure the uniqueness logic works correctly during profile updates.

Acceptance Criteria

  • Users cannot update their profile with a username that already exists.
  • Users receive clear feedback when attempting to use an unavailable username.
  • The uniqueness check is enforced consistently across all authentication methods.
  • Comprehensive tests cover the new functionality.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions