verifyemailpage
This commit is contained in:
@@ -41,7 +41,7 @@ export default defineConfig((/* ctx */) => {
|
|||||||
node: 'node20'
|
node: 'node20'
|
||||||
},
|
},
|
||||||
|
|
||||||
vueRouterMode: 'hash', // available values: 'hash', 'history'
|
vueRouterMode: 'history', // available values: 'hash', 'history'
|
||||||
// vueRouterBase,
|
// vueRouterBase,
|
||||||
// vueDevtools,
|
// vueDevtools,
|
||||||
// vueOptionsAPI: false,
|
// vueOptionsAPI: false,
|
||||||
|
|||||||
@@ -1,30 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-page class="flex flex-center">
|
<q-page>
|
||||||
<img alt="Quasar logo" src="~assets/quasar-logo-vertical.svg" style="width: 200px; height: 200px">
|
<div class="bg-light-green window-height window-width row justify-center items-center">
|
||||||
<q-btn color="primary" label="Registrar" @click="registrar" />
|
<div class="column">
|
||||||
|
<div class="row"></div>
|
||||||
|
<h1>Página principal</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</q-page>
|
</q-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted } from 'vue'
|
|
||||||
//import { supabaseStore } from '../stores/supabaseStore'
|
//import { supabaseStore } from '../stores/supabaseStore'
|
||||||
//const store = supabaseStore()
|
//const store = supabaseStore()
|
||||||
import useSupabase from '../boot/supabase'
|
//import useSupabase from '../boot/supabase'
|
||||||
const { supabase } = useSupabase()
|
//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 () => {
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const registrar = async () => {
|
|||||||
email: email.value,
|
email: email.value,
|
||||||
password: password.value,
|
password: password.value,
|
||||||
options: {
|
options: {
|
||||||
emailRedirectTo: 'http://localhost:9000/verify-email/',
|
emailRedirectTo: 'http://localhost:9000/verify-email',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if (error) throw error
|
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
|
// quasar.conf.js -> build -> publicPath
|
||||||
history: createHistory(process.env.VUE_ROUTER_BASE)
|
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
|
return Router
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/login',
|
||||||
component: () => import('pages/LoginPage.vue')
|
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'),
|
component: () => import('layouts/MainLayout.vue'),
|
||||||
children: [
|
children: [
|
||||||
{ path: '', component: () => import('pages/IndexPage.vue') }
|
{ path: '', component: () => import('pages/IndexPage.vue') }
|
||||||
|
|||||||
Reference in New Issue
Block a user