Answer the question
In order to leave comments, you need to log in
Where to store React js + Rest api php tokens?
The project was divided into 2 separate projects Spa shop on react js and back on php (rest api). For authorization, etc., I use 2 jwt tokens and a resfresh token. Refresh can store localstorage, but jwt needs to be in a cookie with the http only flag, then I can’t take it from js to fetch it in the back, then where to store it?
Answer the question
In order to leave comments, you need to log in
fetch won't send cookies, unless you set the credentials init option. (
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question