verifyemailpage
This commit is contained in:
@@ -41,7 +41,7 @@ export default defineConfig((/* ctx */) => {
|
||||
node: 'node20'
|
||||
},
|
||||
|
||||
vueRouterMode: 'hash', // available values: 'hash', 'history'
|
||||
vueRouterMode: 'history', // available values: 'hash', 'history'
|
||||
// vueRouterBase,
|
||||
// vueDevtools,
|
||||
// vueOptionsAPI: false,
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
<template>
|
||||
<q-page class="flex flex-center">
|
||||
<img alt="Quasar logo" src="~assets/quasar-logo-vertical.svg" style="width: 200px; height: 200px">
|
||||
<q-btn color="primary" label="Registrar" @click="registrar" />
|
||||
<q-page>
|
||||
<div class="bg-light-green window-height window-width row justify-center items-center">
|
||||
<div class="column">
|
||||
<div class="row"></div>
|
||||
<h1>Página principal</h1>
|
||||
</div>
|
||||
</div>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from 'vue'
|
||||
//import { supabaseStore } from '../stores/supabaseStore'
|
||||
//const store = supabaseStore()
|
||||
import useSupabase from '../boot/supabase'
|
||||
const { supabase } = useSupabase()
|
||||
|
||||
const registrar = async () => {
|
||||
const { data, error } = await supabase.auth.signUp(
|
||||
{
|
||||
email: 'nedejih337@rykone.com',
|
||||
password: 'nedejih337',
|
||||
}
|
||||
)
|
||||
console.log(data, '\n', error)
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
//import useSupabase from '../boot/supabase'
|
||||
//const { supabase } = useSupabase()
|
||||
</script>
|
||||
|
||||
@@ -70,7 +70,7 @@ const registrar = async () => {
|
||||
email: email.value,
|
||||
password: password.value,
|
||||
options: {
|
||||
emailRedirectTo: 'http://localhost:9000/verify-email/',
|
||||
emailRedirectTo: 'http://localhost:9000/verify-email',
|
||||
},
|
||||
})
|
||||
if (error) throw error
|
||||
|
||||
28
src/pages/VerifyEmailPage.vue
Normal file
28
src/pages/VerifyEmailPage.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="bg-light-green window-height window-width row justify-center items-center">
|
||||
<div class="column">
|
||||
<div class="row"></div>
|
||||
<h1>
|
||||
Verify your email
|
||||
</h1>
|
||||
<h5>{{ token }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const token = ref('')
|
||||
|
||||
onMounted(() => {
|
||||
console.log(route)
|
||||
console.log(route.fullPath)
|
||||
//guardar en un objeto para sacar el token o el error
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
@@ -25,6 +25,13 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
||||
// quasar.conf.js -> build -> publicPath
|
||||
history: createHistory(process.env.VUE_ROUTER_BASE)
|
||||
})
|
||||
// to hacia
|
||||
// from desde
|
||||
Router.beforeEach((to, from, next) => {
|
||||
console.log(to)
|
||||
console.log(from)
|
||||
next()
|
||||
})
|
||||
|
||||
return Router
|
||||
})
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('pages/LoginPage.vue')
|
||||
path: '/login',
|
||||
component: () => import('pages/LoginPage.vue'),
|
||||
name: 'login'
|
||||
},
|
||||
{
|
||||
path: '/index',
|
||||
path: '/verify-email',
|
||||
component: () => import('pages/VerifyEmailPage.vue'),
|
||||
name: 'verify-email'
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: () => import('layouts/MainLayout.vue'),
|
||||
children: [
|
||||
{ path: '', component: () => import('pages/IndexPage.vue') }
|
||||
|
||||
Reference in New Issue
Block a user