Skip to content

Commit

Permalink
fix: move oauth config file
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-dalmet committed Oct 21, 2024
1 parent 7cbdbfe commit 2f8c7df
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/features/auth/OAuthLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down
2 changes: 1 addition & 1 deletion src/features/auth/PageOAuthCallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/server/config/oauth/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/server/config/oauth/utils.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
5 changes: 3 additions & 2 deletions src/server/routers/oauth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.',
});
}

Expand Down

0 comments on commit 2f8c7df

Please sign in to comment.