From 838047bb4c786e96b26ba6d83b868f3250872f36 Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Sat, 5 Oct 2024 15:48:19 -0400 Subject: [PATCH] rename 2fa routes --- server/routers/external.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/routers/external.ts b/server/routers/external.ts index 3b31d8f6..b187b4d9 100644 --- a/server/routers/external.ts +++ b/server/routers/external.ts @@ -110,13 +110,17 @@ authRouter.use( authRouter.put("/signup", auth.signup); authRouter.post("/login", auth.login); authRouter.post("/logout", auth.logout); -authRouter.post("/verify-totp", verifySessionUserMiddleware, auth.verifyTotp); authRouter.post( - "/request-totp-secret", + "/2fa/verify-code", + verifySessionUserMiddleware, + auth.verifyTotp, +); +authRouter.post( + "/2fa/request-secret", verifySessionUserMiddleware, auth.requestTotpSecret, ); -authRouter.post("/disable-2fa", verifySessionUserMiddleware, auth.disable2fa); +authRouter.post("/2fa/disable", verifySessionUserMiddleware, auth.disable2fa); authRouter.post("/verify-email", verifySessionMiddleware, auth.verifyEmail); authRouter.post( "/request-email-code",