From 1570073556bb6980eb24fe107e55af1a0c3d9bc4 Mon Sep 17 00:00:00 2001 From: Michael Brusegard <56915010+michaelbrusegard@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:44:17 +0100 Subject: [PATCH] fix: backend bug and start auth flow with feide --- src/app/[locale]/auth/page.tsx | 16 +++++++--- src/app/api/auth/feide/route.ts | 1 + .../assets/logos/HackerspaceLogo.tsx | 2 +- src/server/api/locale.ts | 29 +++++++++---------- src/server/api/routers/auth.ts | 10 +++---- src/server/api/trpc.ts | 7 +---- src/server/api/types.ts | 7 ----- src/server/auth/feide.ts | 4 +-- 8 files changed, 35 insertions(+), 41 deletions(-) delete mode 100644 src/server/api/types.ts diff --git a/src/app/[locale]/auth/page.tsx b/src/app/[locale]/auth/page.tsx index e64c7e3..dd2b79a 100644 --- a/src/app/[locale]/auth/page.tsx +++ b/src/app/[locale]/auth/page.tsx @@ -1,9 +1,11 @@ import { FeideLogo } from '@/components/assets/logos/FeideLogo'; import { Button } from '@/components/ui/Button'; import { Separator } from '@/components/ui/Separator'; +import { api } from '@/lib/api/server'; import { Link } from '@/lib/locale/navigation'; import { FingerprintIcon } from 'lucide-react'; import { getTranslations, setRequestLocale } from 'next-intl/server'; +import ExternalLink from 'next/link'; export default async function SignInPage({ params, @@ -13,17 +15,23 @@ export default async function SignInPage({ const { locale } = await params; setRequestLocale(locale); const t = await getTranslations('auth'); + const feideUrlHref = await api.auth.getFeideUrlHref(); return ( -
+

{t('welcome')}

{t('description')}

-
+

{t('signInWith')}

-