feat: Implement a command for issuing password reset links

This commit is contained in:
Ginger committed 2026-03-18 12:42:55 -04:00
1 parent 267feb3c09
commit da8833fca4
7 files changed
+56 -1

No files matched your search

+13
View File
@@ -6,6 +6,7 @@ use conduwuit::{
config::{Config, check},
error, implement,
};
use url::Url;
use crate::registration_tokens::{ValidToken, ValidTokenSource};
@@ -23,6 +24,18 @@ impl Service {
.clone()
.map(|token| ValidToken { token, source: ValidTokenSource::Config })
}
/// Get the base domain to use for user-facing URLs.
#[must_use]
pub fn get_client_domain(&self) -> Url {
self.well_known.client.clone().unwrap_or_else(|| {
let host = self.server_name.host();
format!("https://{host}")
.as_str()
.try_into()
.expect("server name should be a valid host")
})
}
}
#[async_trait]