-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt Instance error on try to integrate Nuxt Auth and TanStack. #273
Comments
Can you please try with this version and confirm that the fix works? pnpm add https://pkg.pr.new/atinux/nuxt-auth-utils@278 Then start again your development server and try to reproduce your issue. |
It works well. Thanks |
You can now use https://github.com/atinux/nuxt-auth-utils/releases/tag/v0.5.3 :) |
The main issue was calling The fix was to use the variables defined before any |
I'm using TanStack to fetch and cache my data, so I created a plugin to manage it. After three retries I'd like to redirect the user to the auth path and clear the session.
The problem is that I'm receiving the famous "A composable that requires access to the Nuxt instance was called outside of a plugin..." error.
I tried to use
nuxtApp.runWithContext(() => {})
to manage it but unfortunately doesn't work.Is there any way to fix it @atinux?? I'll place my code below to make it easy to understand.
The text was updated successfully, but these errors were encountered: