How zuby012/kivo works
Kivo is a Nuxt authentication frontend: users can reach login or registration, establish a session, and access a protected home page; verification is a distinct authorization stage. The sampled code shows in-memory session state, refresh/logout requests, and route middleware, plus Apple/Google OAuth links. Login and registration components, verification UI, and legal pages are present, but their wiring was not shown in the excerpts, so those links are omitted. The README identifies only a Nuxt starter and documents no additional product capabilities.
Main entry points: auth.ts Auth middleware · useAuth.ts Auth session · useAPI.ts Authorized API client · index.vue Protected home
Components 17
Authentication UI
- Login page
app/pages/login.vue - Registration page
app/pages/register.vue - Login form
app/components/auth/LoginForm.vue - Registration form
app/components/auth/RegisterForm.vue - OAuth links
app/components/auth/OAuthButton.vue - Verification page
app/pages/verify.vue - Legal pages
app/pages/privacy.vue - Terms page
app/pages/terms.vue - Input validation
app/utils/validators.ts
Session and access
- Auth session
app/composables/useAuth.ts - Authorized API client
app/composables/useAPI.ts - Auth middleware
app/middleware/auth.ts - Protected home
app/pages/index.vue
Application shell
- Nuxt root
app/app.vue - Default layout
app/layouts/default.vue
Other components
- Visitor
- Auth API
Connections 12
- Visitor → Login page: opens
- Nuxt root → Default layout: renders
app/app.vue - Authorized API client → Auth session: reads session
app/composables/useAPI.ts - Authorized API client → Auth API: refreshes token
app/composables/useAPI.ts - Auth middleware → Auth session: checks session
app/middleware/auth.ts - Auth middleware → Auth API: refreshes token
app/middleware/auth.ts - Auth middleware → Login page: redirects unauthenticated
app/middleware/auth.ts - Auth middleware → Verification page: redirects unverified
app/middleware/auth.ts - Protected home → Auth middleware: declares middleware
app/pages/index.vue - Protected home → Auth session: reads session
app/pages/index.vue - Auth session → Auth API: refreshes and logs out
app/composables/useAuth.ts - OAuth links → Auth API: links to OAuth
app/components/auth/OAuthButton.vue