mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-31 15:09:39 +02:00
Websocket working and newt auth working
This commit is contained in:
parent
4b82e90936
commit
4d0cfe07b7
8 changed files with 147 additions and 8 deletions
|
@ -24,6 +24,7 @@ import {
|
|||
import { verifyUserHasAction } from "./auth/verifyUserHasAction";
|
||||
import { ActionsEnum } from "@server/auth/actions";
|
||||
import { verifyUserIsOrgOwner } from "./auth/verifyUserIsOrgOwner";
|
||||
import { createNewt, getToken } from "./newt";
|
||||
|
||||
// Root routes
|
||||
export const unauthenticated = Router();
|
||||
|
@ -353,6 +354,8 @@ authenticated.delete(
|
|||
// role.removeRoleAction
|
||||
// );
|
||||
|
||||
authenticated.put("/newt", createNewt);
|
||||
|
||||
// Auth routes
|
||||
export const authRouter = Router();
|
||||
unauthenticated.use("/auth", authRouter);
|
||||
|
@ -367,6 +370,8 @@ authRouter.use(
|
|||
authRouter.put("/signup", auth.signup);
|
||||
authRouter.post("/login", auth.login);
|
||||
authRouter.post("/logout", auth.logout);
|
||||
authRouter.post('/newt/get-token', getToken);
|
||||
|
||||
authRouter.post("/2fa/enable", verifySessionUserMiddleware, auth.verifyTotp);
|
||||
authRouter.post(
|
||||
"/2fa/request",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue