1
0
forked from baron/baron-sso

code check 오류 수정

This commit is contained in:
2026-04-09 16:45:26 +09:00
parent 06a6875cdb
commit c6ddf7c485
21 changed files with 83 additions and 36 deletions

View File

@@ -7,7 +7,7 @@
"node": ">=24.0.0"
},
"scripts": {
"dev": "vite --host 0.0.0.0",
"dev": "vite --host 127.0.0.1",
"build": "tsc -b && vite build",
"lint": "biome check .",
"preview": "vite preview",

View File

@@ -19,8 +19,8 @@ fi
if [ "$mode" = "production" ]; then
echo "Running in production mode with Vite preview..."
exec sh -c "npm run build && npm run preview -- --host 0.0.0.0"
exec sh -c "npm run build && npm run preview -- --host 127.0.0.1"
fi
echo "Running in development mode..."
exec npm run dev -- --host 0.0.0.0
exec npm run dev -- --host 127.0.0.1

View File

@@ -40,13 +40,7 @@ function LoginPage() {
returnTo,
},
});
}, [
auth,
auth.activeNavigator,
auth.isLoading,
returnTo,
shouldAutoLogin,
]);
}, [auth, auth.activeNavigator, auth.isLoading, returnTo, shouldAutoLogin]);
const handleSSOLogin = async () => {
try {

View File

@@ -150,7 +150,18 @@ function ClientDetailsPage() {
);
}
if (isLoading && !data) {
return (
<div className="p-8 text-center">
{t("msg.dev.clients.details.loading", "Loading app details...")}
</div>
);
}
const client = data?.client;
if (!client) {
return null;
}
const endpointValues = data?.endpoints ?? {
discovery: "-",
issuer: "-",
@@ -469,6 +480,7 @@ function ClientDetailsPage() {
)}
rows={5}
value={redirectUris}
onFocus={(e) => e.currentTarget.select()}
onChange={(e) => {
redirectUrisHydratedRef.current = true;
setRedirectUris(e.target.value);

View File

@@ -258,7 +258,7 @@ function ClientGeneralPage() {
return;
}
setLogoPreviewStatus("loading");
}, [hasLogoUrl, hasValidLogoUrl, trimmedLogoUrl]);
}, [hasLogoUrl, hasValidLogoUrl]);
const handleSecurityProfileChange = (profile: SecurityProfile) => {
setClientType(profile);
@@ -814,7 +814,9 @@ function ClientGeneralPage() {
<div
className={cn(
"flex h-20 w-20 shrink-0 items-center justify-center rounded-lg border-2 border-dashed",
hasLogoUrl && hasValidLogoUrl && logoPreviewStatus !== "error"
hasLogoUrl &&
hasValidLogoUrl &&
logoPreviewStatus !== "error"
? "bg-white"
: "bg-muted/40",
logoPreviewStatus === "error"
@@ -922,6 +924,7 @@ function ClientGeneralPage() {
</Label>
<Textarea
value={redirectUris}
onFocus={(e) => e.currentTarget.select()}
onChange={(e) => setRedirectUris(e.target.value)}
placeholder={t(
"ui.dev.clients.general.redirect.placeholder",

View File

@@ -1552,6 +1552,7 @@ ory = ""
session = ""
[ui.userfront.dashboard]
link_status_label = ""
last_auth_label = ""
status_history = ""

View File

@@ -147,6 +147,7 @@ test.describe("DevFront role report", () => {
);
await page.getByRole("button", { name: /앱 생성|Create/i }).click();
await createPromise;
await expect(page).toHaveURL(/\/clients\/client-\d+\/settings$/);
await expect
.poll(() =>
state.auditLogs.some((item) => {

View File

@@ -125,6 +125,7 @@ export async function seedAuth(page: Page, role?: string) {
"oidc.user:http://localhost:5000/oidc/:devfront",
JSON.stringify(mockOidcUser),
);
window.localStorage.setItem("dev_role", injectedRole || "rp_admin");
window.localStorage.setItem("dev_tenant_id", "tenant-a");
},
{ issuedAt: nowInSeconds, injectedRole: role ?? "" },
@@ -197,6 +198,9 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
};
await page.route("**/api/v1/user/me", async (route) => {
const storedRole =
(await page.evaluate(() => window.localStorage.getItem("dev_role"))) ??
"rp_admin";
return json(route, {
id: "playwright-user",
loginId: "playwright@example.com",
@@ -206,7 +210,7 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
department: "QA",
tenantId: "tenant-a",
tenantName: "Tenant A",
role: "rp_admin",
role: storedRole,
createdAt: "2026-03-03T00:00:00.000Z",
updatedAt: "2026-03-03T00:00:00.000Z",
});

View File

@@ -4,7 +4,7 @@ import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
server: {
host: "0.0.0.0",
host: "127.0.0.1",
allowedHosts: ["sdev.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
proxy: {
"/api": {
@@ -14,7 +14,7 @@ export default defineConfig({
},
},
preview: {
host: "0.0.0.0",
host: "127.0.0.1",
port: 5173,
allowedHosts: ["sdev.hmac.kr", "localhost", "172.16.10.176", "127.0.0.1"],
proxy: {