paper-dynasty-website/pages/login.vue
2025-05-07 13:29:06 -05:00

36 lines
769 B
Vue

<script setup lang="ts">
const supabase = useSupabaseClient()
const email = ref('')
// const sighInWithDiscord = async () => {
// const { data, error } = await supabase.auth.signInWithOAuth({
// provider: 'discord',
// options: {
// redirectTo: 'http://localhost:3000/confirm'
// }
// })
// if (error) console.log(error)
// }
const signInWithOtp = async () => {
const { error } = await supabase.auth.signInWithOtp({
email: email.value,
options: {
emailRedirectTo: 'http://localhost:3000/confirm',
}
})
if (error) console.log(error)
}
</script>
<template>
<div>
<button @click="signInWithOtp">
Sign In with E-Mail
</button>
<input
v-model="email"
type="email"
/>
</div>
</template>