Nuxt.js Auth Refresh Work
On the Laravel backend, refresh tokens are working just fine.. So now Nuxt.js Auth has to handle it... If there is authentication in the header from $axios, it
On the Laravel backend, refresh tokens are working just fine..
So now Nuxt.js Auth has to handle it...
If there is authentication in the header from $axios, it needs to be replaced with a new token...
I changed the token setup very smoothly and confirmed that it works normally without interruptions.
But the problem that arose here... is the issue when refreshing the page!!
When you refresh, Auth calls user with that token (perhaps it's a cookie value?)
If the call succeeds, it seems to save the new user data to local storage and display it..
If it fails, though, it keeps the existing local storage...
(If you set the resetOnError: true option here, when the call fails server-side, it runs auth.reset(), clears local storage, and logs you out.)