aboutsummaryrefslogtreecommitdiffstats
path: root/web/composables/expire-auth.ts
blob: b0e277ee95f25d0a5085c60597ab6adcb4658ab1 (plain)
1
2
3
4
5
6
7
8
export function expireAuth() {
  const authStore = useAuthStore()

  authStore.admin = false;
  authStore.username = null;
  authStore.token = null;
  navigateTo({ path: '/login', state: { error: 'Sorry, your session has expired' } });
}