Code: Select all
import Cookies from 'js-cookie';
//this returns null
const authTokenFromCookies = Cookies.get('authToken');
console.log("AuthToken from cookies:", authTokenFromCookies);
// This returns the token set from the backend
const authToken = response.headers['authToken'];
console.log("AuthToken after login:", authToken);
Was könnte die Ursache sein?