Skip to content

feat: fix 404 on the first app loads when unauthenticated #10262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove other changeS
  • Loading branch information
Emyrk committed Oct 13, 2023
commit 016344ebd14a3b71b862c85d28dbd2c2014c9de0
38 changes: 18 additions & 20 deletions site/src/pages/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,25 @@ export const LoginPage: FC = () => {
}
}
return <Navigate to={redirectTo} replace />;
} else if (isConfiguringTheFirstUser) {
return <Navigate to="/setup" replace />;
} else {
if (isConfiguringTheFirstUser) {
return <Navigate to="/setup" replace />;
} else {
return (
<>
<Helmet>
<title>Sign in to {applicationName}</title>
</Helmet>
<LoginPageView
authMethods={authMethods}
error={signInError}
isSigningIn={isSigningIn}
onSignIn={async ({ email, password }) => {
await signIn(email, password);
navigate("/");
}}
/>
</>
);
}
return (
<>
<Helmet>
<title>Sign in to {applicationName}</title>
</Helmet>
<LoginPageView
authMethods={authMethods}
error={signInError}
isSigningIn={isSigningIn}
onSignIn={async ({ email, password }) => {
await signIn(email, password);
navigate("/");
}}
/>
</>
);
}
};

Expand Down