79199009

Date: 2024-11-18 07:19:31
Score: 2
Natty:
Report link

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?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Sadra Saderi