I am implementing my admin panel using vuejs and my website using nuxtjs.
After logging into the panel I receive an Authorization token from the API.
I want to pass that token to the website, So I chose cookies.
I'm trying to pass the token like this:
document.cookie = `Authorization-Token=${token};domain=.mydomain.ir;path=/;
But no cookies will be set on my parent domain nor my sub-domain.
How can I do that and is using cookies the best way or is there any better ways?
.
- as discussed in this question which I found using your title