added: login, logout and auto refresh token

This commit is contained in:
nquidox 2025-09-10 23:29:27 +03:00
parent 72c796c429
commit f66c014a36
9 changed files with 189 additions and 63 deletions

View file

@ -1,16 +1,16 @@
<script setup lang="js">
import { ref } from 'vue';
import { useAuthStore} from '@/stores/authStore.js';
<script setup>
import { ref } from 'vue'
import { useAuthStore} from '@/stores/authStore.js'
const store = useAuthStore();
const store = useAuthStore()
const email = ref('');
const password = ref('');
const email = ref('')
const password = ref('')
const onSubmit = () => {
store.login(email.value, password.value);
};
store.login(email.value, password.value)
}
</script>
<template>
@ -35,5 +35,7 @@
</template>
<style scoped>
div {
background: red;
}
</style>