mirror of
https://github.com/bitinflow/nuxt-oauth.git
synced 2026-03-22 01:47:32 +00:00
first commit
This commit is contained in:
20
playground/pages/home.vue
Normal file
20
playground/pages/home.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import {useAuth} from "#imports";
|
||||
|
||||
const {user, signOut} = await useAuth();
|
||||
|
||||
definePageMeta({
|
||||
middleware: ["auth"]
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="user">
|
||||
Hello {{ user.name }}
|
||||
|
||||
<button @click="signOut">
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user