Hi guys ,
I can no read authenticated user info after succesfully login.
This is my code:
<template>
<q-page class="flex flex-center">
<div class="row justify-center full-width">
<div class="col-12 col-sm-4 q-px-sm">
<div v-if="isAuthenticated" align="center">
{{user.name}}
</div>
<div align="center">
DASHBOARD
</div>
</div>
</div>
</q-page>
</template>
<script setup>
import { useAuth0 } from '@auth0/auth0-vue';
import { ref, watch, computed } from 'vue'
const auth0 = useAuth0();
const isAuthenticated = ref(auth0.isAuthenticated);
const user = ref(auth0.user);
watch(isAuthenticated, (newX) => {
console.log(`isAuthenticated is ${newX}`)
console.log((user.value.name));
})
</script>
the line:
console.log((user.value.name));
logs undefined when is executed, how ever I canproperly see the name on template , any idea?
Thnaks!