Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: prevent login lockout when skipping wizard password setup (#574)

diegosouzapw9b15996545e6
diff --git a/src/app/(dashboard)/dashboard/onboarding/page.tsx b/src/app/(dashboard)/dashboard/onboarding/page.tsx
index 9987a68942..5cb0255115 100644
--- a/src/app/(dashboard)/dashboard/onboarding/page.tsx
+++ b/src/app/(dashboard)/dashboard/onboarding/page.tsx
@@ -89,6 +89,14 @@ export default function OnboardingWizard() {
const handleSetPassword = async () => {
if (skipSecurity) {
+ // (#574) Explicitly disable requireLogin when skipping password setup
+ try {
+ await fetch("/api/settings/require-login", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ requireLogin: false }),
+ });
+ } catch {}
handleNext();
return;
}
@@ -176,6 +184,19 @@ export default function OnboardingWizard() {
const handleFinish = async () => {
try {
+ // (#574) If no password was set during wizard, disable requireLogin
+ // to prevent the user from being locked out on the login page
+ const settings = await fetch("/api/settings/require-login")
+ .then((r) => r.json())
+ .catch(() => ({}));
+ if (!settings.hasPassword) {
+ await fetch("/api/settings/require-login", {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ requireLogin: false }),
+ }).catch(() => {});
+ }
+
await fetch("/api/settings", {
method: "PATCH",
headers: { "Content-Type": "application/json" },