Redirect auth flows to / instead of /performance
After login, email verification, trust device, and profile setup, users are now redirected to / which handles routing to their first org's dashboard. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,7 @@ const statusQuery = createQuery(() => ({
|
||||
$effect(() => {
|
||||
if (statusQuery.data?.status === "completed") {
|
||||
clearLoginFlowState();
|
||||
goto(statusQuery.data.redirectTo || "/performance");
|
||||
goto(statusQuery.data.redirectTo || "/");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ const userQuery = createQuery(() => ({
|
||||
// Redirect if user doesn't need setup
|
||||
$effect(() => {
|
||||
if (userQuery.data && !userQuery.data.needsSetup) {
|
||||
goto("/performance");
|
||||
goto("/");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ async function handleSubmit(e: Event) {
|
||||
});
|
||||
|
||||
toast.success("Profile setup complete!");
|
||||
goto("/performance");
|
||||
goto("/");
|
||||
} catch (e) {
|
||||
error = e instanceof Error ? e.message : "Failed to save profile";
|
||||
} finally {
|
||||
|
||||
@@ -52,7 +52,7 @@ async function handleTrust() {
|
||||
try {
|
||||
await api.me.trustDevice({ name: deviceName.trim() });
|
||||
toast.success("Device trusted successfully!");
|
||||
goto("/performance");
|
||||
goto("/");
|
||||
} catch (e) {
|
||||
error = e instanceof Error ? e.message : "Failed to trust device";
|
||||
} finally {
|
||||
|
||||
@@ -31,7 +31,7 @@ async function verifyEmail(): Promise<void> {
|
||||
try {
|
||||
await api.auth.verifyEmail({ token });
|
||||
toast.success("Email verified successfully!");
|
||||
goto("/performance");
|
||||
goto("/");
|
||||
} catch (e) {
|
||||
error = e instanceof Error ? e.message : "Verification failed";
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user