rlindskog / vueniverse

Full stack, user based, PWA, Vue template.
MIT License
335 stars 48 forks source link

JWT Token in Cookie #5

Closed ansarizafar closed 7 years ago

ansarizafar commented 7 years ago

Could you please show me where you are setting token as cookie. I can't see it in Sigin.post route handler.

rlindskog commented 7 years ago

@ansarizafar The token is being signed in signIn.post, return to the client as a JSON response, and the client is setting it as a cookie in store/user.js, specifically the SIGN_IN_SUCCESS mutation.

EDIT: Also, the cookie is set in the NUXT middleware, ssr-cookie.js in cases where you prefetch data.

rlindskog commented 7 years ago

@ansarizafar Let me know if you have any other questions.