initial commit - setup dialog and magic link login

This commit is contained in:
2024-03-30 00:30:13 -06:00
commit 56e660f49d
41 changed files with 7681 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<script setup lang="ts">
import {onMounted} from "vue";
import {account} from "@/lib/appwrite";
import {useSessionStore} from "@/stores/session";
import type {Models} from "appwrite";
const sessionStore = useSessionStore();
onMounted(async () => {
console.log('Magic Callback mounted');
const params = new URLSearchParams(window.location.search);
const secret = params.get('secret') || '';
const userId = params.get('userId') || '';
account.updateMagicURLSession(userId, secret).then((user: Models.Session) => {
console.log('Magic URL session updated');
sessionStore.session = user;
}).catch((e) => {
console.error('Error updating magic URL session:', e);
});
});
</script>
<template>
<div>
<h1>Magic Callback</h1>
</div>
</template>
<style scoped>
</style>