Answer the question
In order to leave comments, you need to log in
Cookies are not saved on ios mobile devices, how to fix it?
I have a ReactJs application. To authorize the user, I store the default token in a cookie; upon authorization, the token is overwritten with the user's personal token. I am using axios. I have an interceptor hanging on a request
$api.interceptors.request.use((config) => {
const token = Cookies.get('token')
if (token) {
config.headers.Authorization = `Token ${token}`
}
return config
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question