Add auth starter

This commit is contained in:
2025-06-06 19:42:19 -04:00
parent 1c0c45841f
commit d6555ee216
15 changed files with 12890 additions and 18 deletions

17
ui/pages/auth/signin.vue Normal file
View File

@@ -0,0 +1,17 @@
<template>
<div>
<!-- This page will automatically redirect to the default provider -->
</div>
</template>
<script setup lang="ts">
import { onMounted } from 'vue';
import { useAuth } from '#imports';
const { signIn } = useAuth();
// Automatically redirect to the default provider when the page loads
onMounted(() => {
signIn('default');
});
</script>

21
ui/pages/index.vue Normal file
View File

@@ -0,0 +1,21 @@
<template>
<button @click="login()">
login
</button>
<p> You are {{ authStatus }}</p>
<p v-if="user">Email: {{ user.email }}</p>
</template>
<script setup lang="ts">
const { signIn, signOut, status, data } = useAuth();
const authStatus = status.value;
const user = data.value?.user;
function login() {
signIn('default');
}
</script>