Denoder / nuxt-module-alternatives

Alternative modules to use while waiting for Nuxt 3 Compatibility
MIT License
144 stars 14 forks source link

Middleware is not ignored with meta auth: false #105

Closed edupuySportiw closed 2 years ago

edupuySportiw commented 2 years ago

Environment

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 : image

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

Denoder commented 2 years ago

can you try the version i pushed out?

edupuySportiw commented 2 years ago

It works again, thank you !