Implement authentication composable with signin, signup, and session management; add route middleware for auth checks

This commit is contained in:
lucast committed 2025-12-05 02:47:41 +01:00
1 parent e1716c3e61
commit 170d24c117
3 files changed
+64

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
export default defineNuxtRouteMiddleware((to, from) => {
const auth = useAuth()
if (!auth.refreshToken.value && !to.fullPath.includes("/auth"))
return navigateTo("/auth/signin")
})