Provider component
Wrap your app in AuthdogProvider once and every component gets access to the verified session. No prop drilling, no manual context.
- One-time setup
- No prop drilling
Vue
Add login, sessions, and user data with a provider component and reactive composables that feel native to Vue. Authdog handles the cookies and token refresh so you focus on your app.
Reactive composables
<script setup lang="ts">
import { useUser } from "@authdog/vue"
const { user, isLoading } = useUser()
</script>
Verify the session on the server
// server/authdog.ts
import { createAuthdogServer } from "@authdog/vue/server"
const authdog = createAuthdogServer({
publicKey: process.env.AUTHDOG_PUBLIC_KEY!,
})
Composition API native
A provider, reactive composables, and server helpers that fit the way Vue apps are built.
Wrap your app in AuthdogProvider once and every component gets access to the verified session. No prop drilling, no manual context.
useSession, useUser, useSignIn, useSignUp, and useSignOut give you reactive auth state and actions that feel native to the Composition API.
createAuthdogServer(), getSessionCookie(), and logoutHandler() handle verification and the session lifecycle on the server side.
Sessions ride secure, HTTP-only cookies and tokens are validated for you. No client-side token juggling to get wrong.
Auth state is fully reactive, so your templates and computed values update the moment a user signs in or out.
A fully typed SDK gives you autocomplete for the user, claims, and roles inside your components and composables.
Add @authdog/vue and your environment's public key.
Wrap your app in AuthdogProvider, once.
Read the session with useUser() or useSession().
Install the SDK, wrap your app in the provider, and read the session with a composable today. Free to start, with secure defaults built in.