diff options
Diffstat (limited to 'web/composables/expire-auth.ts')
| -rw-r--r-- | web/composables/expire-auth.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/composables/expire-auth.ts b/web/composables/expire-auth.ts new file mode 100644 index 0000000..b0e277e --- /dev/null +++ b/web/composables/expire-auth.ts @@ -0,0 +1,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' } }); +}
\ No newline at end of file |
