Closed eduardojsc18 closed 2 months ago
Hey @eduardojsc18, I tried to reproduce the behavior but had no success. I pushed minimal repro for breeze-nuxt
template, could you please try it with your API?
The branch name is token-mode
, here you can find the diff.
On the API side, I have excluded localhost
from SANCTUM_STATEFUL_DOMAINS
and used authentication endpoints from routes/api.php
instead of routes/web.php
. You can check it as well, here - breeze-api.
I'm closing this one due to inactivity, feel free to re-open with further details!
Hello @manchenkoff, thank you very much for your feedback!
I did as you advised and it really worked! After removing the localhost addresses from SANCTUM_STATEFUL_DOMAINS it started saving automatically.
Describe the bug Good morning! I'm having a problem with the option to save my authentication token in a cookie. My back-end returns exactly as it is in the documentation (a simple JSON containing only the token {token:}) but it does not save it in the cookie, so, after returning the token, the application tries to connect to the USER but as unauthenticated. BUT if I put the save settings via localstorage in app.config it works perfectly
Expected behavior I need you to save the token in cookies
Screenshots
Module information
"nuxt-auth-sanctum": "^0.4.8",
Nuxt environment:
"nuxt": "^3.12.4", Mode: CSR Environment: local