Skip to content

### πŸ”§ Issue: Integrate Backend Login with Frontend – EnrollNow LMSΒ #15

@agaesh

Description

@agaesh

Description:
This issue tracks the integration of the backend login system with the frontend login form. The backend provides JWT-based authentication using HttpOnly cookies, and the frontend form needs to connect to the /users/login endpoint.


βœ… Checklist

πŸ” Backend

  • Ensure /users/login route is working with proper validations
  • JWT is generated and set in HttpOnly cookie on successful login
  • Proper error responses for invalid credentials
  • CORS settings allow frontend domain
  • CSRF protection (if needed)

πŸ’» Frontend

  • Form inputs are bound to email and password
  • Submit button triggers async login request via Axios
  • Axios includes withCredentials: true
  • On success, redirect to dashboard
  • On error, display user-friendly message

βš™οΈ Integration

  • Test login with correct credentials
  • Test login with wrong credentials
  • Verify JWT is stored in cookie (check browser dev tools)
  • Verify secure routes check login status via cookie
  • Ensure logout functionality clears cookie properly

Related PRs:
Link PRs here once available

Labels:
feature backend frontend login integration


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