Closed edupuySportiw closed 2 years ago
Darwin
v16.14.2
3.0.0-rc.12
0.6.0
pnpm@7.14.0
vite
srcDir
typescript
build
modules
publicRuntimeConfig
http
auth
unocss
googleFonts
intlify
@nuxtjs-alt/auth@2.0.26
@nuxtjs-alt/http@1.3.20
@nuxtjs-alt/proxy@1.3.8
@pinia/nuxt@0.4.3
@unocss/nuxt@0.46.0
@intlify/nuxt3@0.2.4
nuxt-svgo@1.0.1
@nuxtjs/google-fonts@3.0.0-0
-
Activate global middleware in nuxt.config.ts : auth: { globalMiddleware: true, ... }
auth: { globalMiddleware: true, ... }
Define page meta to false : definePageMeta({ auth: false, });
definePageMeta({ auth: false, });
When I go to that page, I am still redirected to login page.
When i add the meta auth: false to a page, I should be able to go to that page even if I'm not logged in.
auth: false
The issue started when I updated the package to version 2.0.23. Versions prior to this one are working as expected.
2.0.23
I think the issue is coming from this modification in middleware.ts :
When I add the meta auth: false, to.meta.auth is false and therefore, the middleware is not ignored.
to.meta.auth
No response
can you try the version i pushed out?
It works again, thank you !
Environment
Darwin
v16.14.2
3.0.0-rc.12
0.6.0
pnpm@7.14.0
vite
srcDir
,typescript
,build
,vite
,modules
,publicRuntimeConfig
,http
,auth
,unocss
,googleFonts
,intlify
@nuxtjs-alt/auth@2.0.26
,@nuxtjs-alt/http@1.3.20
,@nuxtjs-alt/proxy@1.3.8
,@pinia/nuxt@0.4.3
,@unocss/nuxt@0.46.0
,@intlify/nuxt3@0.2.4
,nuxt-svgo@1.0.1
,@nuxtjs/google-fonts@3.0.0-0
-
Reproduction
Activate global middleware in nuxt.config.ts :
auth: { globalMiddleware: true, ... }
Define page meta to false :
definePageMeta({ auth: false, });
When I go to that page, I am still redirected to login page.
Describe the bug
When i add the meta
auth: false
to a page, I should be able to go to that page even if I'm not logged in.The issue started when I updated the package to version
2.0.23
. Versions prior to this one are working as expected.I think the issue is coming from this modification in middleware.ts :
When I add the meta
auth: false
,to.meta.auth
is false and therefore, the middleware is not ignored.Additional context
No response
Logs
No response