From 59f1603b0ec988386f3ffcfd3b2192dd17d4e384 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Fri, 15 Dec 2023 23:17:19 +0200 Subject: [PATCH] fix(nextjs): Type of `auth().protect()` when user is signed out --- packages/nextjs/src/app-router/server/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nextjs/src/app-router/server/auth.ts b/packages/nextjs/src/app-router/server/auth.ts index 6d0d4df10ac..03850723841 100644 --- a/packages/nextjs/src/app-router/server/auth.ts +++ b/packages/nextjs/src/app-router/server/auth.ts @@ -41,7 +41,7 @@ type AuthSignedOut = AuthObjectWithoutResources< * This function is experimental as it throws a Nextjs notFound error if user is not authenticated or authorized. * In the future we would investigate a way to throw a more appropriate error that clearly describes the not authorized of authenticated status. */ - protect: never; + protect: () => never; } >;