fastmcp.server.auth.oauth_proxy.ui
OAuth Proxy UI Generation Functions.
This module contains HTML generation functions for consent and error pages.
Functions
create_consent_html
csp_policy: Content Security Policy override. If None, uses the built-in CSP policy with appropriate directives. If empty string "", disables CSP entirely (no meta tag is rendered). If a non-empty string, uses that as the CSP policy value.
create_error_html
error_title: The error title (e.g., “OAuth Error”, “Authorization Failed”)error_message: The main error message to displayerror_details: Optional dictionary of error details to show (e.g.,{"Error Code"\: "invalid_client"})server_name: Optional server name to displayserver_icon_url: Optional URL to server icon/logo
- Complete HTML page as a string

