Created
September 30, 2022 17:34
-
-
Save iMichaelOwolabi/0494dfab097b457855915367595b54d0 to your computer and use it in GitHub Desktop.
Routes file for the passwordless auth app
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
import { Router } from 'express'; | |
import { | |
createAccount, | |
login, | |
verifyUser, | |
} from '../controllers/authController.js'; | |
import { authGuard } from '../middleware/index.js'; | |
const authRouter = Router(); | |
authRouter.post('/signup', createAccount); | |
authRouter.post('/login', login); | |
authRouter.get('/verify/:token', authGuard, verifyUser); | |
export { authRouter }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment