Clear sessionStorage on logout.
This commit is contained in:
@@ -130,6 +130,7 @@ export const useAuthStore = defineStore('auth', {
|
|||||||
async logout() {
|
async logout() {
|
||||||
try {
|
try {
|
||||||
await fetch('/auth/api/logout', {method: 'POST'})
|
await fetch('/auth/api/logout', {method: 'POST'})
|
||||||
|
sessionStorage.clear()
|
||||||
location.reload()
|
location.reload()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Logout error:', error)
|
console.error('Logout error:', error)
|
||||||
|
|||||||
Reference in New Issue
Block a user