Skip to content

Commit

Permalink
add auth releated utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
mubaidr committed Mar 3, 2025
1 parent 0fa25dc commit 273be00
Show file tree
Hide file tree
Showing 19 changed files with 437 additions and 82 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"get-installed-browsers": "^0.1.7",
"globals": "^16.0.0",
"postcss": "^8.5.3",
"prettier": "^3.5.2",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.11",
"sass": "^1.85.1",
"tailwindcss": "^4.0.9",
"terser": "^5.39.0",
"tsx": "^4.19.3",
"typescript": "^5.8.2",
"typescript-eslint": "^8.25.0",
"typescript-eslint": "^8.26.0",
"unplugin-auto-import": "^19.1.1",
"unplugin-icons": "^22.1.0",
"unplugin-imagemin": "^0.6.7",
Expand All @@ -59,7 +59,7 @@
"vite-plugin-html": "^3.2.2",
"vite-plugin-vue-devtools": "^7.7.2",
"vite-plugin-zip-pack": "^1.2.4",
"vue-tsc": "^2.2.6",
"vue-tsc": "^2.2.8",
"vuefire": "^3.2.1",
"web-ext": "^8.4.0",
"webext-bridge": "^6.0.1"
Expand Down
148 changes: 74 additions & 74 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/components/UserProfile.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup lang="ts">
const router = useRouter()
const { isAuthenticated, userProfile } = useAuth()
if (!isAuthenticated) {
router.push("/common/account/signin")
}
</script>

<template>
<div>
<template v-if="isAuthenticated && userProfile">
<h1>{{ userProfile.email }}</h1>
<hr />

<UserSignOut />
</template>
</div>
</template>

<style scoped></style>
Loading

0 comments on commit 273be00

Please sign in to comment.