-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61d4381
commit 5a1d079
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const express = require('express'); | ||
const router = express.Router(); | ||
const authController = require('../controllers/authController'); | ||
const validateAuth = require('../middleware/validateAuth'); | ||
|
||
// Route for user registration | ||
router.post('/register', authController.registerUser); | ||
|
||
// Route for user login | ||
router.post('/login', authController.loginUser); | ||
|
||
// Route for user logout (if applicable) | ||
router.post('/logout', validateAuth, authController.logoutUser); | ||
|
||
// Route for password reset | ||
router.post('/forgot-password', authController.forgotPassword); | ||
|
||
// Route for password reset confirmation | ||
router.post('/reset-password/:token', authController.resetPassword); | ||
|
||
module.exports = router; |