Closed hiroki-otaka closed 4 months ago
Hello 👋
Please provide a reproduction for this issue 🙏
https://stackblitz.com/edit/github-4rxvta?file=pages%2Findex.vue,app.vue,nuxt.config.ts
Key points are:
The local provider seems to prevent this error. https://github.com/sidebase/nuxt-auth/blob/8e6519f90f00c7b4478ed34088d69e5bcb0ba5dc/src/runtime/middleware/auth.ts#L70-L75
Hi @hiroki-otaka 👋
This makes sense. The expectation for the local
provider was added wayyyy back in 2023 #543, before the refresh provider was added. I assume it slipped through when we created it, however the fix should be very easy. Would you like to push a PR and include the refresh
provider in the same check?
Thank you for explaining backgrounds. And sure, I'll make a PR.
Environment
Reproduction
cd nuxt-auth/playground-refresh
definePageMeta({ auth: false })
outDescribe the bug
Error "500 Infinite redirect in navigation guard" is shown.
The same procedure in playground-local has no problem. The documentation states that the local provider and the refresh provider is the same except refreshing tokens. The refresh provider should treat the login path as special as the local provider does.
Additional context
No response
Logs
No response