fix: Don't crash when the client URL doesn't have a domain

Having a URL with an IP literal, for example, is allowed
This commit is contained in:
Jade Ellis authored and Ginger committed 2025-11-11 11:34:26 -05:00
1 parent 5bd1bedad0
commit 1ce1254514
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@ pub(crate) async fn authorize(
.well_known
.client
.as_ref()
.map(|s| s.domain().expect("well-known client should be a domain"));
.map(|s| s.host_str().expect("well-known client should have a host"));
let hostname = hostname.unwrap_or("Continuwuity");
match oauth.authorization_header() {
| None => {
+1 -1
View File
@@ -47,7 +47,7 @@ pub(crate) async fn oidc_login(
.well_known
.client
.as_ref()
.map(|s| s.domain().expect("well-known client should have a domain"));
.map(|s| s.host_str().expect("well-known client should have a host"));
let hostname = hostname.unwrap_or("Continuwuity");
let authorization_query: AuthorizationQuery = query.into();