2024-09-15 01:50:36 +02:00

28 lines
563 B
Vue

<script setup lang="ts">
import type { Database } from '@pel/supabase/types'
const user = useSupabaseUser()
const { auth } = useSupabaseClient<Database>()
watch(user, () => {
if (user.value)
return navigateTo('/')
}, { immediate: true })
onMounted(async () => {
const token_hash = window.location.hash.replace('#', '')
const type = 'signup'
const { error } = await auth.verifyOtp({ token_hash, type })
if (error) console.log(error)
})
</script>
<template>
<div>
<p class="u-text-black">
Redirecting...
</p>
</div>
</template>