Authentication for Vue, the Composition way
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.
Composition API native
Everything Vue apps need
A provider, reactive composables, and server helpers that fit the way Vue apps are built.
Provider component
Wrap your app in AuthdogProvider once and every component gets access to the verified session — no prop drilling, no manual context.
Composables
useSession, useUser, useSignIn, useSignUp, and useSignOut give you reactive auth state and actions that feel native to the Composition API.
Server helpers
createAuthdogServer(), getSessionCookie(), and logoutHandler() handle verification and the session lifecycle on the server side.
Secure by default
Sessions ride secure, HTTP-only cookies and tokens are validated for you. No client-side token juggling to get wrong.
Reactive sessions
Auth state is fully reactive, so your templates and computed values update the moment a user signs in or out.
Typed SDK
A fully typed SDK gives you autocomplete for the user, claims, and roles inside your components and composables.
Server-side sessions
Verify the session on the server
Create a server instance with createAuthdogServer() and verify sessions in your API routes and SSR handlers. The public key is parsed once, and tokens are only ever trusted after the identity host confirms them.
// server/authdog.tsimport { createAuthdogServer } from "@authdog/vue/server"Â const authdog = createAuthdogServer({ publicKey: process.env.AUTHDOG_PUBLIC_KEY!,})Ship auth, not boilerplate
Authdog's Vue integration leans on the Composition API and secure cookies, so auth state is reactive and the tokens never touch your client code.
To wire auth across your app
Wrap the tree in AuthdogProvider once and every composable resolves the verified session — no per-component setup.
Reactive auth state
useSession and useUser return reactive refs, so the UI tracks sign-in and sign-out without any manual wiring.
Tokens exposed to the browser
Sessions live in secure, HTTP-only cookies verified on the server — nothing for client code to read or leak.
Add auth to your Vue app.
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.