Files
owlen/crates/platform/auth/Cargo.toml
vikingowl 5b0774958a feat(auth): add multi-provider authentication with secure credential storage
Authentication System:
- Add credentials crate with keyring (OS keychain) and file fallback storage
- Add auth-manager crate for unified auth across providers
- Implement API key login flow for Anthropic, OpenAI, and Ollama Cloud
- Add CLI commands: login, logout, auth (status)
- Store credentials securely in macOS Keychain / GNOME Keyring / Windows Credential Manager

API Key Helpers:
- Support for password manager integration (1Password, Bitwarden, pass, AWS Secrets, Vault)
- Command-based helpers with TTL caching
- Priority chain: env vars → helpers → cache → stored credentials

Background Token Refresh:
- Automatic OAuth token refresh before expiration
- Configurable check interval and refresh threshold

MCP OAuth Support:
- Add OAuth config to MCP server definitions
- Support for SSE/HTTP transport with OAuth
- Token storage with mcp: prefix

Bug Fixes:
- Fix keyring crate requiring explicit backend features (was using mock store)
- Fix provider index not updated on credential store
- Add User-Agent headers to avoid Cloudflare blocks

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 00:27:37 +01:00

34 lines
844 B
TOML

[package]
name = "auth-manager"
version = "0.1.0"
edition.workspace = true
license.workspace = true
rust-version.workspace = true
description = "Unified authentication manager for LLM providers with OAuth and token refresh"
[dependencies]
# Credential storage
credentials = { path = "../credentials" }
# LLM provider types (AuthMethod, OAuthProvider, etc.)
llm-core = { path = "../../llm/core" }
# Provider-specific OAuth implementations
llm-anthropic = { path = "../../llm/anthropic" }
llm-openai = { path = "../../llm/openai" }
# Async runtime for OAuth flows and token refresh
tokio = { version = "1", features = ["time", "sync", "rt", "macros"] }
# Error handling
thiserror = "2"
# Logging
tracing = "0.1"
# Browser opening for OAuth
open = "5"
[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }