Can request account deletion

This commit is contained in:
2023-06-06 09:47:52 +02:00
parent 1a8211c13d
commit 4b8baa2416
8 changed files with 83 additions and 5 deletions

View File

@ -88,6 +88,14 @@ pub struct AppConfig {
)]
pub reset_password_url: String,
/// Delete account URL
#[clap(
long,
env,
default_value = "http://localhost:3000/delete_account#TOKEN"
)]
pub delete_account_url: String,
/// URL where the OpenID configuration can be found
#[arg(
long,
@ -154,6 +162,11 @@ impl AppConfig {
self.reset_password_url.replace("TOKEN", token)
}
/// Get account delete URL
pub fn get_account_delete_url(&self, token: &str) -> String {
self.delete_account_url.replace("TOKEN", token)
}
/// Get OpenID providers configuration
pub fn openid_providers(&self) -> Vec<OIDCProvider<'_>> {
if self.disable_oidc {