Replies: 1 comment
-
Hi @Jopgood, You don't need to implement the store yourself for the session; the module does it for you with Nuxt internal session + cookies composable. We are currently working on the documentation; you will see updates on that very soon. |
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
-
Hey there!
I am aware there are similar discussions on this topic but I feel that I may need a slightly clearer explanation on how best to setup a Nuxt web app using this module.
I have set up a Nuxt app and have a pinia store that logs the user into the website using useDirectusAuth() login() but I am finding that my middleware is not quite working as intended and is assuming the user is not logged in upon refresh.
my store:
and my middleware:
I can see the directus_refresh_cookie is in the browser cookies but the user is not staying logged in when refreshing and is consistently being returned back to /login?
I am quite new to Nuxt and this module so go easy on me, still learning!
thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions