Sign in fails when the next parameter is empty (#261)

* Refactor sign-in flow to ensure fallback return paths

Updated logic to use fallback values for `returnPath` to prevent potential undefined behavior. Improved consistency in handling default paths during sign-in and redirection processes.
This commit is contained in:
Giancarlo Buomprisco
2025-05-28 08:27:45 +07:00
committed by GitHub
parent 40afecde93
commit cb80e4fdcf
2 changed files with 5 additions and 3 deletions

View File

@@ -45,8 +45,10 @@ export function SignInMethodsContainer(props: {
router.replace(joinTeamPath);
} else {
const returnPath = props.paths.returnPath || '/home';
// otherwise, we should redirect to the return path
router.replace(props.paths.returnPath);
router.replace(returnPath);
}
};