Build a self-contained authentication system where your FastMCP server manages users, issues tokens, and validates them.
New in version: 2.11.0
OAuthProvider
abstract class that implements the OAuth 2.1 specification. To use this pattern, you must subclass OAuthProvider
and implement all required abstract methods.
OAuthProvider
handles OAuth endpoints, protocol flows, and security requirements, but delegates all storage, user management, and business logic to your implementation of the abstract methods.None
if token is invalid or expired.AccessToken
if valid, None
if invalid.