Using Auth
Sign-in flows, session handling, and organization context in the Quickback Stack
This page covers how to use Better Auth in your Quickback Stack application — sign-in flows, session management, and working with organization context.
Sign-In Flows
Better Auth supports multiple sign-in methods:
- Email/Password — Traditional credential-based authentication
- Email OTP — One-time passwords sent via email
- Magic Links — Passwordless email links
- Passkeys — WebAuthn biometric/hardware key authentication
Session Handling
Sessions are stored in Cloudflare KV for fast edge-based lookups.
// Access the current session in a Hono route
app.get('/api/me', async (c) => {
const session = c.get('session');
const user = c.get('user');
return c.json({ user, session });
});Organization Context
When organizations are enabled, the current organization is available in the request context:
const orgId = c.get('session')?.activeOrganizationId;Related
- Auth Overview — Setup and configuration
- Auth Plugins — Available plugins
- Auth Security — Security best practices