Skip to content

Set Up Authentication Controller and Routes #10

@Fis-ayo

Description

@Fis-ayo

Description

Create the initial backend authentication structure for CodeFolio by setting up the authentication controller, authentication routes, and connecting those routes to the main Express server.

This issue focuses only on organizing the backend authentication flow so future auth logic can be added cleanly.

Tasks

  • Create an authController.js file
  • Add placeholder controller functions for:
    • register
    • login
    • logout
    • getCurrentUser / checkSession
  • Create an authRoutes.js file
  • Define authentication routes for:
    • POST /register
    • POST /login
    • POST /logout
    • GET /me or GET /current-user
  • Export the auth routes properly
  • Import and connect auth routes in the main server file
  • Confirm routes are mounted under a base path such as /api/auth
  • Test all routes to make sure they are reachable without server errors

Acceptance Criteria

  • authController.js exists and includes the core auth controller functions
  • authRoutes.js exists and includes the expected auth endpoints
  • Auth routes are connected to the Express server
  • Server runs successfully with the new auth structure
  • Auth endpoints can be hit successfully in Postman, Thunder Client, or similar tool

Metadata

Metadata

Assignees

Labels

authenticationuser authentication needs cautionbackendFeature applies to the backend aspect of the app

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions