jwt in headers+localstorage instead of httpOnly cookie (#117)

This commit is contained in:
Marco
2023-12-27 14:32:08 +01:00
committed by GitHub
parent f7ba203ed0
commit c5535fad71
14 changed files with 125 additions and 155 deletions

View File

@@ -10,10 +10,8 @@ export default function Logout() {
const url = useRecoilValue(serverURL)
const logout = async () => {
const res = await fetch(`${url}/auth/logout`)
if (res.ok) {
navigate('/login')
}
localStorage.removeItem('token')
navigate('/login')
}
const { i18n } = useI18n()