fix(auth): accept configured public origin for sign-in
Magent CI/CD / verify (push) Successful in 4m51s
Magent CI/CD / deploy-beta (push) Successful in 12s

This commit is contained in:
2026-09-19 12:25:43 +12:00
parent fd6671cf7e
commit 153ac86a5a
8 changed files with 335 additions and 13 deletions
+3 -10
View File
@@ -1,7 +1,8 @@
"use client";
import { useEffect, useState, type FormEvent } from "react";
import { type FormEvent, useEffect, useState } from "react";
import { getApiBase, setToken } from "../lib/auth";
import { loginErrorMessage } from "../lib/login-errors";
import AuthLayout from "../ui/AuthLayout";
type LoginMode = "jellyfin" | "local";
@@ -73,15 +74,7 @@ export default function LoginPage() {
},
);
if (!response.ok) {
setError(
response.status === 429
? "Too many attempts. Please wait a moment and try again."
: response.status >= 500
? "Sign-in is temporarily unavailable. Please try again shortly."
: response.status === 403
? "This account cannot sign in. Please contact an administrator."
: "Check your username and password, then try again.",
);
setError(await loginErrorMessage(response));
return;
}
const data = await response.json();