From 0582c311c9845708055bb19f12579b7db585eda8 Mon Sep 17 00:00:00 2001 From: mihretue Date: Tue, 25 Aug 2026 13:24:29 +0000 Subject: [PATCH] feat(signup): serve the Fayda callback at /callback too Fayda matches the registered redirect URI exactly, and the value being registered first is a bare /callback. The descriptive path stays so the route still reads as part of signup once that can be changed. --- apps/portal/src/app/router.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/portal/src/app/router.tsx b/apps/portal/src/app/router.tsx index 348b98685..5e2c539c5 100644 --- a/apps/portal/src/app/router.tsx +++ b/apps/portal/src/app/router.tsx @@ -69,9 +69,14 @@ export const router = createBrowserRouter([ { path: "/signup", element: }, // Where Fayda returns the applicant. Public by necessity — they have no - // account yet. It redeems the code and hands control back to /signup; the - // path must match the API's REDIRECT_URI, which is registered with Fayda. + // account yet. It redeems the code and hands control back to /signup. + // + // Two paths for one page: whichever is registered with Fayda has to match the + // API's FAYDA_REDIRECT_URI exactly, and the value being registered first is a + // bare /callback. The descriptive path is kept so the route still reads as + // part of signup once that can be changed. { path: "/signup/fayda/callback", element: }, + { path: "/callback", element: }, // Completes the forgot-password flow; the reset message links here. The // IAM package generates `/reset-password` links, `/set-password` is the