Configuration Classes
EmailPasswordConfig
@dataclass
class EmailPasswordConfig:
enabled: bool = True
min_password_length: int = 8
max_password_length: int = 128
require_email_verification: bool = False
send_reset_password_email: bool = True
SessionConfig
@dataclass
class SessionConfig:
strategy: str = "cookie" # "cookie" or "jwt"
max_age: int = 60 * 60 * 24 * 7 # 7 days
jwt_secret: str | None = None
cookie_name: str = "nexfetch_auth.session_token"
cookie_httponly: bool = True
cookie_secure: bool = True
cookie_samesite: str = "lax"
cookie_path: str = "/"
cookie_domain: str | None = None
RateLimitConfig
@dataclass
class RateLimitConfig:
enabled: bool = True
window: int = 60 # seconds
max_requests: int = 10