From e06d05e8db1398be43c1ea0f77172f3683b08921 Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Fri, 17 Apr 2026 19:58:45 +0200 Subject: [PATCH] feat(auth): refactor sign-out functionality and update import paths --- frontend/app/Navigation.tsx | 10 +++------- frontend/app/actions/auth-actions.ts | 7 +++++++ frontend/lib/auth-headers.ts | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 frontend/app/actions/auth-actions.ts diff --git a/frontend/app/Navigation.tsx b/frontend/app/Navigation.tsx index a12bfbcf..08052190 100644 --- a/frontend/app/Navigation.tsx +++ b/frontend/app/Navigation.tsx @@ -1,5 +1,6 @@ import Link from 'next/link'; -import { auth, signOut } from '../auth'; +import { auth } from '../auth'; +import { signOutAction } from './actions/auth-actions'; const linkStyle: React.CSSProperties = { padding: '0.5rem 0.75rem', @@ -41,12 +42,7 @@ export default async function Navigation() { 👤 {session.user.name} -
{ - 'use server'; - await signOut({ redirectTo: '/login' }); - }} - > +