From 0419fb765f02f071e47d4e86d6f8c120710f6596 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Mon, 2 Feb 2026 07:51:58 -0600 Subject: [PATCH 01/20] fix: conditionally show login/logout in auth0 example nav The navigation was showing both Login and Logout links simultaneously. Now uses useUser() hook to show only the relevant auth action. --- .../nextjs/example-auth0/app/layout.tsx | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/fixtures/nextjs/example-auth0/app/layout.tsx b/tests/fixtures/nextjs/example-auth0/app/layout.tsx index 69bcb6b5..a90894d9 100644 --- a/tests/fixtures/nextjs/example-auth0/app/layout.tsx +++ b/tests/fixtures/nextjs/example-auth0/app/layout.tsx @@ -1,15 +1,25 @@ +'use client'; + import Link from 'next/link'; -import { UserProvider } from '@auth0/nextjs-auth0/client'; +import { UserProvider, useUser } from '@auth0/nextjs-auth0/client'; + +function Nav() { + const { user, isLoading } = useUser(); + + return ( + + ); +} export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - +