From d186ffb6d716e3804570e66218bcc78c07217c45 Mon Sep 17 00:00:00 2001
From: Michael Brusegard <56915010+michaelbrusegard@users.noreply.github.com>
Date: Sun, 17 Nov 2024 15:48:32 +0100
Subject: [PATCH] fix: ability to set cookies in trpc
---
src/app/[locale]/auth/page.tsx | 14 +-----
src/app/api/auth/feide/route.ts | 57 ++++++++++++-----------
src/app/api/data/[trpc]/route.ts | 5 +-
src/components/auth/FeideButton.tsx | 25 ++++++++++
src/components/providers/TRPCProvider.tsx | 9 +---
src/server/api/routers/auth.ts | 30 ++++++++++--
src/server/auth/feide.ts | 20 ++++----
7 files changed, 99 insertions(+), 61 deletions(-)
create mode 100644 src/components/auth/FeideButton.tsx
diff --git a/src/app/[locale]/auth/page.tsx b/src/app/[locale]/auth/page.tsx
index dd2b79a..f46d61e 100644
--- a/src/app/[locale]/auth/page.tsx
+++ b/src/app/[locale]/auth/page.tsx
@@ -1,11 +1,9 @@
-import { FeideLogo } from '@/components/assets/logos/FeideLogo';
+import { FeideButton } from '@/components/auth/FeideButton';
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,
@@ -15,7 +13,6 @@ export default async function SignInPage({
const { locale } = await params;
setRequestLocale(locale);
const t = await getTranslations('auth');
- const feideUrlHref = await api.auth.getFeideUrlHref();
return (
@@ -25,14 +22,7 @@ export default async function SignInPage({
{t('signInWith')}
-
+