Skip to content

Mountainash Auth Client

An intelligent textbook for the mountainash-auth-client type-safe multi-provider authentication library.

Textbook deferred — unavailable. The inherited chapter outline and topics below are retained for reference; no textbook is currently published.

Source repository

Chapters

  1. Foundations
  2. Auth Type System and Basic Types
  3. Advanced Auth Type Variants
  4. Auth Dispatch and OAuth 1.0a
  5. OAuth 2.0 Flow
  6. Secret Storage
  7. Callback Server and Token Errors
  8. Connection Mixins and Token Lifecycle

Key Topics

  • Auth type system -- discriminated union of 13 auth types with Literal kind discriminator for type-safe authentication configuration
  • OAuth 2.0 and OAuth 1.0a flows -- Authorization Code with PKCE, token exchange, refresh, expiry, and three-legged OAuth 1.0a support
  • Token lifecycle management -- five-state machine (no-token, valid, expired-with-refresh, expired-no-refresh, cleared) with automatic transitions
  • Secret storage -- SecretStore protocol with FilesystemStore implementation using YAML, file locking, and atomic writes for credential persistence
  • Connection mixins -- OAuth2ConnectionMixin and OAuth1ConnectionMixin integrating token lifecycle with auth dispatch for driver-specific kwargs