Implemented actual authentication guards, began implementing main login user flows

This commit is contained in:
2025-10-19 19:27:48 -04:00
parent e6016a19bb
commit 5d7ebd2136
12 changed files with 237 additions and 80 deletions

View File

@@ -16,13 +16,14 @@ import AlertDescription from './components/ui/alert/AlertDescription.vue';
const userStore = useUserStore();
onMounted(async () => {
const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
credentials: 'include',
});
const data = await res.json();
userStore.user = data;
});
// onMounted(async () => {
// const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
// credentials: 'include',
// });
// const data = await res.json();
// console.log(data);
// userStore.user = data;
// });
async function logout() {
await fetch(`${import.meta.env.VITE_APIHOST}/logout`, {