# Using Auth

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.

```typescript
// 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:

```typescript
const orgId = c.get('session')?.activeOrganizationId;
```

## Related

- [Auth Overview](/stack/auth) — Setup and configuration
- [Auth Plugins](/stack/auth/plugins) — Available plugins
- [Auth Security](/stack/auth/security) — Security best practices
