login and authentication
login via totp authentication via access and refresh tokens
This commit is contained in:
parent
6696975bee
commit
e1ec65350d
28 changed files with 3750 additions and 0 deletions
22
src/routes/auth.ts
Normal file
22
src/routes/auth.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import express from "express";
|
||||
import { login, logout, refresh, register } from "../controller/authController";
|
||||
|
||||
var router = express.Router({ mergeParams: true });
|
||||
|
||||
router.post("/login", async (req, res) => {
|
||||
await login(req, res);
|
||||
});
|
||||
|
||||
router.post("/logout", async (req, res) => {
|
||||
await logout(req, res);
|
||||
});
|
||||
|
||||
router.post("/refresh", async (req, res) => {
|
||||
await refresh(req, res);
|
||||
});
|
||||
|
||||
router.post("/register", async (req, res) => {
|
||||
await register(req, res);
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue