Register nuxt axios interceptors as a nuxt plugin makes nuxt auth middleware not working on page reload #1623
Unanswered
yoelpc4
asked this question in
Support Requests
Replies: 1 comment
-
plugins/axios let me see. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version
nuxt: 2.14.12
@nuxtjs/axios: 5.12.4
@nuxtjs/auth-next: 5.0.0-1608461079.ae1e5db
nprogress: 0.2.0
Nuxt configuration
mode:
Nuxt configuration
Reproduction
https://codesandbox.io/s/inspiring-chebyshev-v2ryf
What is expected?
On secure page reload, the authenticated user is passed the auth middleware check and stay on the secure page.
What is actually happening?
On secure page reload, the authenticated user is redirected to the login page instead of stay on the secure page. This happens because the authenticated user is not passed the auth middleware check.
Steps to reproduce
This reproduction register an axios plugin on nuxt config
If the axios plugin is unregistered from nuxt config, when we click on reload button then the expected behavior is happened.
Additional information
Checklist
Steps to reproduce
What is expected?
What is actually happening?
Performance analysis?
Beta Was this translation helpful? Give feedback.
All reactions