dystcz / nuxt-sanctum-auth

Nuxt 3 + laravel sanctum authentication
134 stars 25 forks source link

remove navigateTo in addRouteMiddleware #4

Closed qdz90 closed 1 year ago

qdz90 commented 1 year ago

Great package, thanks for sharing!

I think the following is a bug:

The auth middleware returns a 500 status on Nuxt 3.2.0 Removing navigateTo in the addRouteMiddleware and returning just the url fixes this!

Line 21: return navigateTo(config.redirects.login); Replace with: return config.redirects.login;

Same goes for line 27.


Any plans to add the register and forgot-password functions?

kreejzak commented 1 year ago

Hello, thanks for pointing this out! Will look into it in few hours.

Regarding the register/forgot password functionality: As of right now, I do not plan to introduce these functions, because those are usually simple post requests to api and have no need to bear tokens and sessions. In the future things may change, but for now there is no plan to add those functions.

kreejzak commented 1 year ago

Fixed in version 0.2.6. Thanks again for pointing out this error.