Since it is stack blitz I can't change the url in the search but I think via csr, before the redirect we will be able to see the page we want to access for a quick sec no?
w/ ssr it works perfect, but I have no clue for client side redirect, that would be my question now since it can happen in the future i have this to do
Should I handle the login state in the global store at the place so I can use the middleware server side?
If so, is there also a way client side for redirect without having console error?
runtime-core.esm-bun….js?v=3826bf5e:3730 Hydration completed but contains mismatches.
runtime-core.esm-bun…er.js?v=3826bf5e:47 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .
at <NuxtLayoutProvider layoutProps=
{ref: RefImpl}
key="default" name="default" ... >
at <NuxtLayout>
at <App key=4 >
at <NuxtRoot>
runtime-dom.esm-bundler.js?v=3826bf5e:15 Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
runtime-core.esm-bun….js?v=3826bf5e:3730 Hydration completed but contains mismatches.
runtime-core.esm-bun…er.js?v=3826bf5e:47 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .
at <NuxtLayoutProvider layoutProps=
{ref: RefImpl}
key="default" name="default" ... >
at <NuxtLayout>
at <App key=4 >
at <NuxtRoot>
runtime-dom.esm-bundler.js?v=3826bf5e:15 Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
If you go with the global method, you would then need to specify which routes are accessible to users not logged in with something like this:
definePageMeta({
auth: false,
})
This does not work, I do not see it in the doc
@oneeach So this is the way, I need to disable server side check since this is for local storage too.
Is it normal that I can see the page a bit render before the navigate back to login>
Thanks!