You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sidebase/nuxt-auth 0.9.4 and 0.10.0
Nuxt 3.14.1592
Reproduction
no need reproduction
Describe the bug
I am experiencing a significant issue with the sidebase/nuxt-auth module in my Nuxt 3 project. After installing the module, all my custom middleware stopped working, and I started encountering TypeScript errors when defining middleware in definePageMeta.
Here’s a detailed breakdown of the problem:
When I define custom middleware (e.g., "authme") in definePageMeta:
It seems that the type definition for middleware is restricted to "sidebase-auth", as shown in the generated .nuxt/types/middleware.d.ts:
exporttypeMiddlewareKey="sidebase-auth";
This restriction prevents me from using my custom middleware (authme). Is there a way to extend the MiddlewareKey type to include my custom middleware, or should I handle it differently?
How did you actually define the named middleware in your application? The
definePageMeta({
middleware: "authme",
});
example you shown is usage and not definition.
Environment
@sidebase/nuxt-auth 0.9.4 and 0.10.0
Nuxt 3.14.1592
Reproduction
no need reproduction
Describe the bug
I am experiencing a significant issue with the sidebase/nuxt-auth module in my Nuxt 3 project. After installing the module, all my custom middleware stopped working, and I started encountering TypeScript errors when defining middleware in definePageMeta.
Here’s a detailed breakdown of the problem:
I get the following TypeScript error:
.nuxt/types/middleware.d.ts
look like this:Additional context
Final Issue Summary:
The root cause of this issue is that the internal middleware system of
sidebase/nuxt-auth
overrides the default Nuxt middleware behavior. As a result:middleware
property ofPageMeta
.Logs
No response
The text was updated successfully, but these errors were encountered: