Open andyjamesn opened 4 months ago
I may be wrong but it seems like the auth plugin is checking for if the user is undefined. But on reload the user is null
not undefined
. This means await fetchCurrentUser();
doesn't get called so the user is not populated.
I am not sure if I am missing something with how this should work.
I pulled down a fresh version of this repo installed everything and connected it to my Laravel backend.
Everything works great, I can login, logout, use middleware etc. I can navigate around to pages and everything works.
But if I reload the page on welcome for example which has auth middleware I am taken back to the login page.
Is this the expected behaviour and I need to add some code to persist the login?