Closed EdnaldoNeimeg closed 1 year ago
This is config i'm using:
nuxtSanctumAuth: { token: false, // set true to use jwt-token auth instead of cookie. default is false baseUrl: "http://api.lavanderia.site", endpoints: { csrf: "/sanctum/csrf-cookie", login: "/api/login", logout: "/api/logout", user: "/api/user", }, csrf: { headerKey: "X-XSRF-TOKEN", cookieKey: "XSRF-TOKEN", tokenCookieKey: "nuxt-sanctum-auth-token", }, redirects: { home: "/", login: "/login", logout: "/", }, },
After login, when the request to /api/user is made i see that Authorization and XSRF tokens are not ser in request headers.
Actually, it was happening because Nuxt and Laravel are running in different domains. Closing.
This is config i'm using:
nuxtSanctumAuth: { token: false, // set true to use jwt-token auth instead of cookie. default is false baseUrl: "http://api.lavanderia.site", endpoints: { csrf: "/sanctum/csrf-cookie", login: "/api/login", logout: "/api/logout", user: "/api/user", }, csrf: { headerKey: "X-XSRF-TOKEN", cookieKey: "XSRF-TOKEN", tokenCookieKey: "nuxt-sanctum-auth-token", }, redirects: { home: "/", login: "/login", logout: "/", }, },
After login, when the request to /api/user is made i see that Authorization and XSRF tokens are not ser in request headers.