diff --git a/app/core/DiscordStrategy.server.ts b/app/core/auth/DiscordStrategy.server.ts similarity index 100% rename from app/core/DiscordStrategy.server.ts rename to app/core/auth/DiscordStrategy.server.ts diff --git a/app/core/authenticator.server.ts b/app/core/auth/authenticator.server.ts similarity index 100% rename from app/core/authenticator.server.ts rename to app/core/auth/authenticator.server.ts diff --git a/app/core/session.server.ts b/app/core/auth/session.server.ts similarity index 100% rename from app/core/session.server.ts rename to app/core/auth/session.server.ts diff --git a/app/root.tsx b/app/root.tsx index c78cd5cbe..0582b0b3a 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -14,13 +14,13 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; -import { authenticator } from "~/core/authenticator.server"; +import { authenticator } from "~/core/auth/authenticator.server"; import globalStyles from "~/styles/global.css"; import layoutStyles from "~/styles/layout.css"; import resetStyles from "~/styles/reset.css"; import commonStyles from "~/styles/common.css"; import { Layout } from "./components/layout"; -import type { LoggedInUser } from "./core/DiscordStrategy.server"; +import type { LoggedInUser } from "~/core/auth/DiscordStrategy.server"; export const unstable_shouldReload: ShouldReloadFunction = () => false; diff --git a/app/routes/auth/callback.tsx b/app/routes/auth/callback.tsx index a7a3e9ad3..56492d3ab 100644 --- a/app/routes/auth/callback.tsx +++ b/app/routes/auth/callback.tsx @@ -1,4 +1,7 @@ -import { authenticator, DISCORD_AUTH_KEY } from "~/core/authenticator.server"; +import { + authenticator, + DISCORD_AUTH_KEY, +} from "~/core/auth/authenticator.server"; import type { LoaderFunction } from "@remix-run/node"; import { redirect } from "@remix-run/node"; import { userPage } from "~/utils/urls"; diff --git a/app/routes/auth/index.tsx b/app/routes/auth/index.tsx index 340609491..786c15e66 100644 --- a/app/routes/auth/index.tsx +++ b/app/routes/auth/index.tsx @@ -1,4 +1,7 @@ -import { authenticator, DISCORD_AUTH_KEY } from "~/core/authenticator.server"; +import { + authenticator, + DISCORD_AUTH_KEY, +} from "~/core/auth/authenticator.server"; import type { ActionFunction } from "@remix-run/node"; export const action: ActionFunction = async ({ request }) => { diff --git a/app/routes/auth/logout.tsx b/app/routes/auth/logout.tsx index 5c9548367..5ca101e35 100644 --- a/app/routes/auth/logout.tsx +++ b/app/routes/auth/logout.tsx @@ -1,5 +1,5 @@ import type { ActionFunction } from "@remix-run/node"; -import { authenticator } from "~/core/authenticator.server"; +import { authenticator } from "~/core/auth/authenticator.server"; export const action: ActionFunction = async ({ request }) => { await authenticator.logout(request, { redirectTo: "/" }); diff --git a/app/utils/remix.ts b/app/utils/remix.ts index cd107a008..5d4e35309 100644 --- a/app/utils/remix.ts +++ b/app/utils/remix.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { authenticator } from "~/core/authenticator.server"; +import { authenticator } from "~/core/auth/authenticator.server"; export function notFoundIfFalsy(value: T | null | undefined): T { if (!value) throw new Response(null, { status: 404 });