Before you start
- A Vue 3 app built with Vite.
- Test keys from the Authbound dashboard. See Get API keys.
- A wallet that can answer your policy. Test with a wallet shows how to set one up.
Add your keys
.env
openssl rand -base64 32. Both API URL variables hold the API URL for your key’s mode. The VITE_ values end up in the browser bundle, which is fine: publishable keys, policy IDs and the API URL aren’t secret.Add the server
The Authbound router adds the routes the browser SDK calls: starting a verification and setting a session cookie when it succeeds.During development, have Vite forward
server.ts
/api to it so both run on the same origin:vite.config.ts
Try it
Start the server withnpx tsx --env-file=.env server.ts and the app with pnpm dev. Scan the QR code with your wallet and approve the request. The page switches to “You’re verified”.
Next steps
Receive webhooks
Add a webhook route to the Express server and confirm results there.
Browser sessions
Session modes, several tabs, time limits and proxies.
How it works
Why access decisions belong on your server.
Station UI
For enabled organizations, useStationEntry, StationEntryDisplay and StationOperatorConsole from @authbound/vue with explicit imports. The station UI guide explains token scopes and direct Gateway versus same-origin proxy mode.