fetchOpenIdMetadata
Fetches OpenID Connect discovery document from the authorization server.
This extension function queries the /.well-known/openid-configuration endpoint to retrieve server metadata including authorization endpoints, token endpoints, and JWKS URI.
The client must have ContentNegotiation installed with a JSON converter that can deserialize OpenIdProviderMetadata.
The returned OpenIdProviderMetadata contains discovered endpoint URLs and supported features.
Return
The OpenID Connect configuration containing endpoints and metadata
Parameters
issuer
The issuer URL (e.g., "https://accounts.google.com")
Throws
if the request fails or the response is invalid
if the decoded metadata fails issuer or required endpoint validation