DEV Community

Discussion on: How to make nuxt auth working with JWT - a definitive guide

Collapse
 
mrnaif2018 profile image
MrNaif2018

Thank you! Strange that it didn't work as it is almost a full copy of auth middleware, but glad you got it resolved (:
In my setup there are login and signup pages, but it's up to you how to organize your site.

Collapse
 
sopon73293607 profile image
sopon

Thanks for quick reply :)

I don't understand why you use middleware: ["loggedIn"] :(
Can you please explain easyway. If you don't mind :)
Thanks

Thread Thread
 
mrnaif2018 profile image
MrNaif2018

It was because of rehydration errors, not matching content on server and client side, and by enabling this middleware client side only it solved the issues. if (!process.client) return; is the only change. Not DRY, I know (:
In near days I am going to hunt one more bug, will update the post after I fix that(axios dynamic base url not used, it requests local server and not the remote one).