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:
committed by
GitHub
parent
40afecde93
commit
cb80e4fdcf
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user