[package]
name = "better-auth-core"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Core abstractions for better-auth: traits, types, config, error handling"
repository = { workspace = true }

[dependencies]
# Asynchronous runtime
tokio = { workspace = true }
async-trait = { workspace = true }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# Error handling
thiserror = { workspace = true }

# Validation
validator = { workspace = true }

# Time handling
chrono = { workspace = true }

# Data structures
uuid = { workspace = true }

# Cookie parsing
cookie = { workspace = true }

# Pattern matching
glob-match = "0.2.1"
# Crypto
argon2 = { workspace = true }
rand = { workspace = true }
base64 = { workspace = true }
jsonwebtoken = { workspace = true }

# Database (optional)
sqlx = { workspace = true, optional = true }

# Cache (optional)
redis = { workspace = true, optional = true }

# Derive macros (optional)
better-auth-derive = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
http-body-util = { version = "0.1", optional = true }
url = { workspace = true }
idna = "1"
tracing.workspace = true

[features]
default = []
derive = ["dep:better-auth-derive"]
sqlx-postgres = ["dep:sqlx"]
redis-cache = ["dep:redis"]
axum = ["dep:axum", "dep:http-body-util"]
