Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRONTEND] User login logic #53

Open
emttiew opened this issue Apr 16, 2024 · 0 comments
Open

[FRONTEND] User login logic #53

emttiew opened this issue Apr 16, 2024 · 0 comments
Assignees

Comments

@emttiew
Copy link
Contributor

emttiew commented Apr 16, 2024

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.
@emttiew emttiew self-assigned this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant