From da2cbc87a2d122c6cf0ced5292358f2f1cbf6230 Mon Sep 17 00:00:00 2001 From: Nixxx19 Date: Tue, 17 Feb 2026 11:04:05 +0530 Subject: [PATCH 1/2] signup dev same as prod --- client/modules/User/actions.ts | 12 ++++++++++-- server/controllers/user.controller/signup.ts | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/client/modules/User/actions.ts b/client/modules/User/actions.ts index b34c2bd1b4..6f268f23d3 100644 --- a/client/modules/User/actions.ts +++ b/client/modules/User/actions.ts @@ -92,7 +92,11 @@ export function validateAndLoginUser(formProps: { }) ); dispatch(justOpenedProject()); - browserHistory.push(previousPath); + const path = + previousPath === '/signup' || previousPath === '/login' + ? '/' + : previousPath; + browserHistory.push(path); resolve(); }) .catch((error) => @@ -123,7 +127,11 @@ export function validateAndSignUpUser(formValues: CreateUserRequestBody) { .then((response) => { dispatch(authenticateUser(response.data)); dispatch(justOpenedProject()); - browserHistory.push(previousPath); + const path = + previousPath === '/signup' || previousPath === '/login' + ? '/' + : previousPath; + browserHistory.push(path); resolve(); }) .catch((error) => { diff --git a/server/controllers/user.controller/signup.ts b/server/controllers/user.controller/signup.ts index 4aabd9df0e..cf38ceab63 100644 --- a/server/controllers/user.controller/signup.ts +++ b/server/controllers/user.controller/signup.ts @@ -71,7 +71,13 @@ export const createUser: RequestHandler< res.json(userResponse(user)); } catch (mailErr) { console.error(mailErr); - res.status(500).json({ error: 'Failed to send verification email.' }); + // In development, still return success so signup UX matches production + // (redirect to home, user logged in). Email may be unconfigured locally. + if (process.env.NODE_ENV !== 'production') { + res.json(userResponse(user)); + } else { + res.status(500).json({ error: 'Failed to send verification email.' }); + } } }); } catch (err) { From 5065dbf4048244c69aac98f3be05320ee3b22b20 Mon Sep 17 00:00:00 2001 From: Nixxx19 Date: Tue, 17 Feb 2026 12:06:46 +0530 Subject: [PATCH 2/2] revert client redirect, prod unchanged --- client/modules/User/actions.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/client/modules/User/actions.ts b/client/modules/User/actions.ts index 6f268f23d3..b34c2bd1b4 100644 --- a/client/modules/User/actions.ts +++ b/client/modules/User/actions.ts @@ -92,11 +92,7 @@ export function validateAndLoginUser(formProps: { }) ); dispatch(justOpenedProject()); - const path = - previousPath === '/signup' || previousPath === '/login' - ? '/' - : previousPath; - browserHistory.push(path); + browserHistory.push(previousPath); resolve(); }) .catch((error) => @@ -127,11 +123,7 @@ export function validateAndSignUpUser(formValues: CreateUserRequestBody) { .then((response) => { dispatch(authenticateUser(response.data)); dispatch(justOpenedProject()); - const path = - previousPath === '/signup' || previousPath === '/login' - ? '/' - : previousPath; - browserHistory.push(path); + browserHistory.push(previousPath); resolve(); }) .catch((error) => {