From 1f3dfaa6654c07b66ed5e603c9016f3442d49330 Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 27 Apr 2023 11:57:42 +0200 Subject: [PATCH] Show redirect URI on providers page --- src/controllers/admin_controller.rs | 3 +++ templates/settings/providers_list.html | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/controllers/admin_controller.rs b/src/controllers/admin_controller.rs index b6c86cf..a9efd42 100644 --- a/src/controllers/admin_controller.rs +++ b/src/controllers/admin_controller.rs @@ -10,6 +10,7 @@ use crate::actors::users_actor::{AuthorizedAuthenticationSources, UsersActor}; use crate::constants::TEMPORARY_PASSWORDS_LEN; use crate::controllers::settings_controller::BaseSettingsPage; use crate::data::action_logger::{Action, ActionLogger}; +use crate::data::app_config::AppConfig; use crate::data::client::{Client, ClientID, ClientManager}; use crate::data::current_user::CurrentUser; use crate::data::provider::{Provider, ProviderID, ProvidersManager}; @@ -28,6 +29,7 @@ struct ClientsListTemplate<'a> { struct ProvidersListTemplate<'a> { _p: BaseSettingsPage<'a>, providers: Vec, + redirect_url: String, } #[derive(Template)] @@ -68,6 +70,7 @@ pub async fn providers_route( ProvidersListTemplate { _p: BaseSettingsPage::get("OpenID Providers list", &user, None, None), providers: providers.cloned(), + redirect_url: AppConfig::get().oidc_provider_redirect_url(), } .render() .unwrap(), diff --git a/templates/settings/providers_list.html b/templates/settings/providers_list.html index f463b0b..289d2d6 100644 --- a/templates/settings/providers_list.html +++ b/templates/settings/providers_list.html @@ -34,4 +34,6 @@ +

Redirect URL for new clients: {{ redirect_url }}

+ {% endblock content %}