added: login, logout and auto refresh token
This commit is contained in:
parent
72c796c429
commit
f66c014a36
9 changed files with 189 additions and 63 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue