Skip to content

[FRONTEND] User login logic #53

@emttiew

Description

@emttiew

Task Description: Implementing User Login Logic Using REST API with Boost.Beast (Client-Side)

Requirements:

  1. HTTP Client Setup:

    • Configure Boost.Beast to act as an HTTP client for making requests to the backend REST API.
    • Set up necessary headers for sending JSON payloads and handling responses.
  2. User Authentication Flow:

    • Implement logic to capture user input (username/email and password) from the login interface.
    • Construct JSON payloads containing user credentials to be sent to the backend API endpoint.
    • Handle user interaction events (e.g., button clicks) to initiate the authentication process.
  3. HTTP Requests:

    • Use Boost.Beast to send HTTP POST requests to the backend API endpoint for user authentication.
    • Include appropriate error handling mechanisms to deal with network failures or invalid responses.
  4. Response Handling:

    • Parse JSON responses received from the backend API to extract authentication status and relevant data.
    • Implement logic to handle different authentication outcomes (e.g., successful login, incorrect credentials, server errors).
  5. User Feedback:

    • Provide clear feedback to the user based on the authentication status (e.g., success message, error message).
    • Update the UI dynamically to reflect the outcome of the authentication attempt.
  6. Security Considerations:

    • Ensure that sensitive information (e.g., passwords) is transmitted securely over HTTPS.
    • Implement client-side validation to prevent unnecessary requests and enhance security.
  7. Testing:

    • Perform unit testing to validate the functionality of the client-side authentication logic.
    • Conduct integration testing to ensure compatibility with the backend REST API.

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