fix: Parse OIDC discovery URL more leniently

This commit is contained in:
Ginger authored and Ellis Git committed 2026-07-10 16:52:04 +00:00
1 parent b915692ae1
commit 9b14ab4c0b
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -2497,7 +2497,7 @@ pub struct OidcConfig {
/// automatically fetch the identity provider's metadata from this URL.
/// Generally you should set this to the base domain your identity provider
/// runs on.
pub discovery_url: Url,
pub discovery_url: String,
/// The OAuth client ID for Continuwuity to use when communicating with the
/// identity provider.
+2 -1
View File
@@ -172,7 +172,8 @@ impl crate::Service for Service {
.expect("redirect url should be valid");
let provider_metadata = CoreProviderMetadata::discover_async(
IssuerUrl::from_url(config.discovery_url.clone()),
IssuerUrl::new(config.discovery_url.clone())
.map_err(|err| err!("Failed to parse OIDC discovery URL: {err}"))?,
client,
)
.await