As deceze mentioned in the comments, you can't access cookies from different domains. You can update the authentication endpoint to return the accessToken
in the response body. Then you can store it using useUserStore
.
But be aware that if you want to store the auth data in the local storage, it can be vulnerable to cross-site scripting (XSS) attacks.
See this question for more information: Where to store a JWT token properly and safely in a web based application?