Logout now requires Authorization: Bearer <access-token>.
This commit is contained in:
@@ -12,8 +12,7 @@ logoutButton.addEventListener('click', async () => {
|
||||
if (token) {
|
||||
await fetch('/api/auth/logout', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({token}),
|
||||
headers: {Authorization: `Bearer ${token}`},
|
||||
}).catch(() => undefined);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user