Skip to content
Closed

Test #18

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/deploy.yml

This file was deleted.

30 changes: 24 additions & 6 deletions src/routes/account/mfa/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export const actions: Actions = {
if (!locals.user) throw redirect(303, "/login");
const config = getRuntimeConfig(platform);
if (!config.signingKeySecret) {
return fail(503, { setup: true, error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다." });
return fail(503, {
setup: true,
error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다.",
});
}

const secret = generateTotpSecret();
Expand All @@ -133,18 +136,27 @@ export const actions: Actions = {

const config = getRuntimeConfig(platform);
if (!config.signingKeySecret) {
return fail(503, { confirm: true, error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다." });
return fail(503, {
confirm: true,
error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다.",
});
}

const setupToken = cookies.get(TOTP_SETUP_COOKIE);
if (!setupToken) {
return fail(400, { confirm: true, error: "등록 세션이 만료되었습니다. 다시 시작해 주세요." });
return fail(400, {
confirm: true,
error: "등록 세션이 만료되었습니다. 다시 시작해 주세요.",
});
}

const plainSecret = await verifySetupToken(setupToken, config.signingKeySecret);
if (!plainSecret) {
cookies.delete(TOTP_SETUP_COOKIE, { path: "/" });
return fail(400, { confirm: true, error: "등록 세션이 만료되었습니다. 다시 시작해 주세요." });
return fail(400, {
confirm: true,
error: "등록 세션이 만료되었습니다. 다시 시작해 주세요.",
});
}

const formData = await event.request.formData();
Expand All @@ -156,7 +168,10 @@ export const actions: Actions = {

const valid = await verifyTotp(code, plainSecret);
if (!valid) {
return fail(400, { confirm: true, error: "코드가 올바르지 않습니다. 다시 확인해 주세요." });
return fail(400, {
confirm: true,
error: "코드가 올바르지 않습니다. 다시 확인해 주세요.",
});
}

const { db, tenant } = requireDbContext(locals);
Expand Down Expand Up @@ -219,7 +234,10 @@ export const actions: Actions = {

const config = getRuntimeConfig(platform);
if (!config.signingKeySecret) {
return fail(503, { delete: true, error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다." });
return fail(503, {
delete: true,
error: "IDP_SIGNING_KEY_SECRET 이 설정되지 않았습니다.",
});
}

const formData = await event.request.formData();
Expand Down
4 changes: 3 additions & 1 deletion src/routes/account/passkeys/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ const formError = $derived((form as { error?: string } | null)?.error ?? null);
d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z" />
</svg>
<div>
<p class="text-sm font-medium text-gray-900">{pk.label ?? "패스키"}</p>
<p class="text-sm font-medium text-gray-900">
{pk.label ?? "패스키"}
</p>
<p class="text-xs text-gray-400">
등록: {new Date(pk.createdAt).toLocaleDateString("ko-KR")}
{#if pk.lastUsedAt}
Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const orgMenuItems = [
</div>

<div class="border-b border-gray-200 px-6 py-4">
<p class="text-sm font-medium text-gray-900">{data.currentUser.displayName ?? "관리자"}</p>
<p class="text-sm font-medium text-gray-900">
{data.currentUser.displayName ?? "관리자"}
</p>
<p class="text-sm text-gray-500">{data.currentUser.email}</p>
</div>

Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/departments/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ const STATUS_COLOR: Record<string, string> = {
{/if}

{#if err && !createErr}
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">{err}</p>
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">
{err}
</p>
{/if}

<div class="overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm">
Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/parts/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ function teamLabel(t: { name: string; departmentName: string | null }) {
{/if}

{#if err && !createErr}
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">{err}</p>
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">
{err}
</p>
{/if}

<div class="overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm">
Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/saml-sps/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ const NAME_ID_OPTIONS = [
<tr class="hover:bg-gray-50">
<td class="px-4 py-3">
<p class="text-sm font-medium text-gray-900">{sp.name}</p>
<p class="font-mono text-xs break-all text-gray-400">{sp.entityId}</p>
<p class="font-mono text-xs break-all text-gray-400">
{sp.entityId}
</p>
</td>
<td class="max-w-50 px-4 py-3 text-xs break-all text-gray-500">{sp.acsUrl}</td>
<td class="px-4 py-3 text-xs text-gray-500">
Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/teams/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ const STATUS_LABEL: Record<string, string> = { active: "활성", inactive: "비
{/if}

{#if err && !createErr}
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">{err}</p>
<p class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">
{err}
</p>
{/if}

<div class="overflow-x-auto rounded-xl border border-gray-200 bg-white shadow-sm">
Expand Down
4 changes: 3 additions & 1 deletion src/routes/admin/users/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ const STATUS_COLOR: Record<string, string> = {
<tr class="hover:bg-gray-50">
<td class="px-4 py-3">
<a href={resolve(`/admin/users/${user.id}`)} class="block hover:underline">
<p class="text-sm font-medium text-gray-900">{user.username ?? "-"}</p>
<p class="text-sm font-medium text-gray-900">
{user.username ?? "-"}
</p>
<p class="text-xs text-gray-500">{user.email}</p>
</a>
</td>
Expand Down