From 413f24f6dc65ebd666c75f18861836d5fb2f1798 Mon Sep 17 00:00:00 2001 From: anisov <36729332+anischihi@users.noreply.github.com> Date: Fri, 1 Mar 2024 15:03:38 +0100 Subject: [PATCH 1/2] fix(5.guest-mode.md): Add missing property I tried the guest middleware, it did not work (not redirect, no unauthenticatedOnly nehaviour). Added the missing snippet, everything works like a charm. I think has been missed in the docs. You can try for yourself --- docs/content/3.application-side/5.guest-mode.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/3.application-side/5.guest-mode.md b/docs/content/3.application-side/5.guest-mode.md index f470a6fe..437017a1 100644 --- a/docs/content/3.application-side/5.guest-mode.md +++ b/docs/content/3.application-side/5.guest-mode.md @@ -15,6 +15,7 @@ This behavior is useful for login pages that you don't want to be visitable by l Briefly summarized, you can enable guest mode on a page by passing the following configuration: ```ts definePageMeta({ + middleware: 'auth', auth: { unauthenticatedOnly: true, navigateAuthenticatedTo: '/profile', From edca54e8d24022765f3903ff6873a3dfa60aba21 Mon Sep 17 00:00:00 2001 From: anisov <36729332+anischihi@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:02:15 +0100 Subject: [PATCH 2/2] Update docs/content/3.application-side/5.guest-mode.md Add comment to addition Co-authored-by: Zoey --- docs/content/3.application-side/5.guest-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/3.application-side/5.guest-mode.md b/docs/content/3.application-side/5.guest-mode.md index 437017a1..6829875c 100644 --- a/docs/content/3.application-side/5.guest-mode.md +++ b/docs/content/3.application-side/5.guest-mode.md @@ -15,7 +15,7 @@ This behavior is useful for login pages that you don't want to be visitable by l Briefly summarized, you can enable guest mode on a page by passing the following configuration: ```ts definePageMeta({ - middleware: 'auth', + middleware: 'auth', // Only required if globalAppMiddleware is disabled auth: { unauthenticatedOnly: true, navigateAuthenticatedTo: '/profile',