diff --git a/src/api/client/oidc/authorize.rs b/src/api/client/oidc/authorize.rs index 9be08e51..2139b465 100644 --- a/src/api/client/oidc/authorize.rs +++ b/src/api/client/oidc/authorize.rs @@ -41,11 +41,8 @@ pub(crate) async fn authorize( // Redirect to the login page if no token or token not known. let hostname = services .config - .well_known - .client - .as_ref() - .map(|s| s.host_str().expect("well-known client should have a host")); - let hostname = hostname.unwrap_or("Continuwuity"); + .server_name + .host(); match oauth.authorization_header() { | None => { return Ok(oidc_login_form(hostname, &query)); diff --git a/src/api/client/oidc/login.rs b/src/api/client/oidc/login.rs index 82c7f39e..1fe32501 100644 --- a/src/api/client/oidc/login.rs +++ b/src/api/client/oidc/login.rs @@ -44,12 +44,8 @@ pub(crate) async fn oidc_login( let hostname = services .config - .well_known - .client - .as_ref() - .map(|s| s.host_str().expect("well-known client should have a host")); - - let hostname = hostname.unwrap_or("Continuwuity"); + .server_name + .host(); let authorization_query: AuthorizationQuery = query.into(); services