fix(auth): accept configured public origin for sign-in
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user