diff --git a/src/features/auth/OAuthLogin.tsx b/src/features/auth/OAuthLogin.tsx index 5876aa788..ee7c2fbbe 100644 --- a/src/features/auth/OAuthLogin.tsx +++ b/src/features/auth/OAuthLogin.tsx @@ -15,7 +15,7 @@ import { OAUTH_PROVIDERS, OAUTH_PROVIDERS_ENABLED_ARRAY, OAuthProvider, -} from '@/lib/oauth/config'; +} from '@/features/auth/oauth-config'; import { trpc } from '@/lib/trpc/client'; export const OAuthLoginButton = ({ diff --git a/src/features/auth/PageOAuthCallback.tsx b/src/features/auth/PageOAuthCallback.tsx index 44ddb612a..12ecb1d9e 100644 --- a/src/features/auth/PageOAuthCallback.tsx +++ b/src/features/auth/PageOAuthCallback.tsx @@ -13,8 +13,8 @@ import { LoaderFull } from '@/components/LoaderFull'; import { useToastError } from '@/components/Toast'; import { ROUTES_ADMIN } from '@/features/admin/routes'; import { ROUTES_APP } from '@/features/app/routes'; +import { zOAuthProvider } from '@/features/auth/oauth-config'; import { ROUTES_AUTH } from '@/features/auth/routes'; -import { zOAuthProvider } from '@/lib/oauth/config'; import { trpc } from '@/lib/trpc/client'; export default function PageOAuthCallback() { diff --git a/src/lib/oauth/config.ts b/src/features/auth/oauth-config.ts similarity index 100% rename from src/lib/oauth/config.ts rename to src/features/auth/oauth-config.ts diff --git a/src/server/config/oauth/index.ts b/src/server/config/oauth/index.ts index 1cd17addf..9e577221c 100644 --- a/src/server/config/oauth/index.ts +++ b/src/server/config/oauth/index.ts @@ -1,6 +1,6 @@ import { match } from 'ts-pattern'; -import { OAuthProvider } from '@/lib/oauth/config'; +import { OAuthProvider } from '@/features/auth/oauth-config'; import { discord } from '@/server/config/oauth/providers/discord'; import { github } from '@/server/config/oauth/providers/github'; import { google } from '@/server/config/oauth/providers/google'; diff --git a/src/server/config/oauth/utils.ts b/src/server/config/oauth/utils.ts index a699bae81..eb7f4ffe4 100644 --- a/src/server/config/oauth/utils.ts +++ b/src/server/config/oauth/utils.ts @@ -1,5 +1,5 @@ import { env } from '@/env.mjs'; -import { OAuthProvider } from '@/lib/oauth/config'; +import { OAuthProvider } from '@/features/auth/oauth-config'; import { AppContext } from '@/server/config/trpc'; export type OAuthClient = { diff --git a/src/server/routers/oauth.tsx b/src/server/routers/oauth.tsx index 601a8cc01..1cd731ee6 100644 --- a/src/server/routers/oauth.tsx +++ b/src/server/routers/oauth.tsx @@ -7,8 +7,8 @@ import { z } from 'zod'; import { env } from '@/env.mjs'; import { zUserAccount } from '@/features/account/schemas'; +import { OAUTH_PROVIDERS, zOAuthProvider } from '@/features/auth/oauth-config'; import { DEFAULT_LANGUAGE_KEY } from '@/lib/i18n/constants'; -import { OAUTH_PROVIDERS, zOAuthProvider } from '@/lib/oauth/config'; import locales from '@/locales'; import { createSession } from '@/server/config/auth'; import { oAuthProvider } from '@/server/config/oauth'; @@ -179,7 +179,8 @@ export const oauthRouter = createTRPCRouter({ ctx.logger.info('Account is disabled'); throw new TRPCError({ code: 'UNAUTHORIZED', - message: 'Unable to authenticate. Please contact support if this issue persists.', + message: + 'Unable to authenticate. Please contact support if this issue persists.', }); }