Hebilicious / authjs-nuxt

AuthJS edge-compatible authentication Nuxt module.
https://authjs-nuxt.pages.dev/
MIT License
253 stars 28 forks source link

Typescript loses the middlewares #61

Closed Shhu closed 1 year ago

Shhu commented 1 year ago

Environment

"@auth/core": "^0.10.0",
"@hebilicious/authjs-nuxt": "0.2.0-beta.5"

Reproduction

https://github.com/Shhu/auth-nuxt-repro-signin-return/blob/main/pages/middlewareIssue.vue

Describe the bug

Typescript loses the middlewares of the packages when a middleware is created in the middleware folder.

If you create a middleware in /middleware typescript no longer knows authjs-nuxt's middlewares (but it still works, types are probably overrode instead of augmented)

Additional context

No response

Logs

No response

Hebilicious commented 1 year ago

This is very likely a nuxt or nuxt kit issue. Will investigate further.

Hebilicious commented 1 year ago

https://github.com/nuxt/nuxt/issues/22584