Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpOnly Cookie is not available inside client side axios, you are using it inside interceptor? what is the solution? #4

Open
Rammehar opened this issue Aug 10, 2022 · 1 comment

Comments

@Rammehar
Copy link

// 3. Set up new refresh token as cookie
const responseCookie = setCookie.parse(resp.headers['set-cookie'])[0] // 3a. We can't just acces it, we need to parse it first.
axiosInstance.defaults.headers.setCookie = resp.headers['set-cookie'] // 3b. Set helper cookie for 'authorize.ts' Higher order Function.
axiosInstance.defaults.headers.cookie = cookie.serialize(
responseCookie.name,
responseCookie.value
)

@Nemestos
Copy link

Hey, i just pass it in the json response (its very dirty but it works xd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants