-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built in cookie store broken in latest version? #674
Comments
I got same issue but only when origins are not same. |
I think it because browsers changed their cookie policies. |
I had the same issue, I did a lot of workarounds but tokens still don't persist in both local storage and cookies, I tried to set cookies from my side in the login request before fetching the user but I couldn't, now I had an Unauthorized error for /user and the login is correctly passed, but due to cookies storage issue, the user data fetching didn't work properly. In another nuxt project, I'm using nuxt-auth package and cookies work properly, i.e I don't think that it's a cookie policies @zorn-v. does anyone know how to inherit the driver properly(to avoid implementing the driver into node_modules), and set cookies on my own using vue-cookie package. |
@BennaceurHichem Hard to say, Did you try any tests independent of the library with just raw JS? |
Using 4.1.7 version with v2, and this is setup:
And login simply does:
When the
stores
is set to["cookie", "storage"]
the login() does its job and fetch back correct jwt but doesn't store the token in either cookie or localStorage, then the user fetch fails because the request is missing theAuthoriziation
header.If I change the
stores
to["storage", "cookie"]
or just removestores
option entirely, then it works fine.The text was updated successfully, but these errors were encountered: