Where should i save refresh token, I save it in my DB but when I send expired JWT so when i try to valid I cant get the payload I save there. Is this safe to decode with atob the JWT so I get the payload and get the username and find in the db the save refresh token. Because if i save in local storage this is unsafe cause us save there a long live token instead only the JWT(the short live one)
I try to save it cookies but CSRF attack also a problem even if i add the httponly and the secure one Please correct me if i wrong
EDIT: I also wanted to ask how i do silent log in, Is this like i do setInterval for 14m so i get the new token even if the user don't do nothing?