Skip to content

Instantly share code, notes, and snippets.

@iMichaelOwolabi
Created September 30, 2022 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMichaelOwolabi/0494dfab097b457855915367595b54d0 to your computer and use it in GitHub Desktop.
Save iMichaelOwolabi/0494dfab097b457855915367595b54d0 to your computer and use it in GitHub Desktop.
Routes file for the passwordless auth app
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