Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

fix(studio): show Windows-specific reset-password command on login error (#4529)

Wasim Yousef Said1129ea44bcd9
diff --git a/studio/frontend/src/features/auth/components/auth-form.tsx b/studio/frontend/src/features/auth/components/auth-form.tsx
index 7d4363c1bf2..d9190429bd5 100644
--- a/studio/frontend/src/features/auth/components/auth-form.tsx
+++ b/studio/frontend/src/features/auth/components/auth-form.tsx
@@ -9,6 +9,7 @@ import { Eye, EyeOff } from "lucide-react";
import { useEffect, useState } from "react";
import type { ReactElement } from "react";
import type { SyntheticEvent } from "react";
+import { usePlatformStore } from "@/config/env";
import { refreshSession } from "../api";
// Bootstrap credentials injected into index.html by the backend
@@ -278,7 +279,14 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
);
navigate({ to: getPostAuthRoute() });
} catch (err: unknown) {
- setError(err instanceof Error ? err.message : "Auth failed.");
+ let msg = err instanceof Error ? err.message : "Auth failed.";
+ if (msg.includes("unsloth studio reset-password") && usePlatformStore.getState().deviceType === "windows") {
+ msg = msg.replace(
+ "unsloth studio reset-password",
+ ".\\unsloth_studio\\Scripts\\unsloth.exe studio reset-password",
+ );
+ }
+ setError(msg);
} finally {
setLoading(false);
}