From 986cb617d50ce6722fc26742479e6da0caf64c67 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Fri, 19 Aug 2022 17:50:24 +0200 Subject: [PATCH] chore(gui-v2): update middleware docs --- packages/nc-gui-v2/middleware/auth.global.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui-v2/middleware/auth.global.ts b/packages/nc-gui-v2/middleware/auth.global.ts index d670c48bc6..ea761d1c7a 100644 --- a/packages/nc-gui-v2/middleware/auth.global.ts +++ b/packages/nc-gui-v2/middleware/auth.global.ts @@ -11,7 +11,19 @@ import { useApi, useGlobal } from '#imports' * the user is redirected to the home page. * * By default, we assume that auth is required - * If not required, mark the page as `requiresAuth: false` using `definePageMeta` + * If not required, mark the page as + * ``` + * definePageMeta({ + * requiresAuth: false + * }) + * ``` + * + * If auth should be circumvented completely mark the page as public + * ``` + * definePageMeta({ + * public: true + * }) + * ``` * * @example * ``` @@ -51,6 +63,9 @@ export default defineNuxtRouteMiddleware(async (to, from) => { } }) +/** + * If present, try using google auth data to sign user in before navigating to the next page + */ async function tryGoogleAuth() { const { signIn } = useGlobal()