Skip to content

Prevent Unauthenticated Users from Booking Appointments #37

@Parth06102006

Description

@Parth06102006

Description:
Currently, users who are not logged in can navigate to the home page, view the doctor list, and attempt to book an appointment directly. This allows unauthenticated access to the appointment flow, which can lead to incomplete or invalid appointment requests and potential data inconsistencies.

Steps to Reproduce:

  • Navigate to the home page without logging in.
  • Go to the doctor list or click on a doctor card.
  • Attempt to book an appointment.
  • Observe that the system allows proceeding without requiring login/signup.

Expected Behavior:

  • Users must be logged in (or signed up) before they can access the appointment booking functionality.
  • If a user attempts to book without being logged in, they should be redirected to the login/signup page.
  • Show a clear, interactive message (e.g., “Please log in or sign up to book an appointment”).

Proposed Fix:

  • Add a login check before allowing access to the appointment booking page.
  • If the user is not logged in, prevent navigation and show an interactive message prompting login/signup.
  • Ensure proper redirection flow so that once logged in, the user is returned to the booking page they initially attempted to access.

Additional Notes:

This change will prevent unauthorized appointment attempts.

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