From 5990258837fc13b0e8adf667cab9accd68ddc9c1 Mon Sep 17 00:00:00 2001 From: Alexander Chernov Date: Mon, 3 Jun 2024 08:31:44 +0300 Subject: [PATCH] add OIDC login buttons --- csp/contests/reg_login_page.csp | 9 +++++++++ csp/contests/unpriv_login_page.csp | 9 +++++++++ csp/super-server/login_page.csp | 18 ++++++++++++++++++ style/icons/oidc-logo.svg | 3 +++ 4 files changed, 39 insertions(+) create mode 100644 style/icons/oidc-logo.svg diff --git a/csp/contests/reg_login_page.csp b/csp/contests/reg_login_page.csp index 30c8bd4c2e..49f786b47c 100644 --- a/csp/contests/reg_login_page.csp +++ b/csp/contests/reg_login_page.csp @@ -118,6 +118,10 @@ + + + +

<% if (oauth_is_available_num(phr->config, 1)) { @@ -133,6 +137,11 @@ if (oauth_is_available_num(phr->config, 3)) { %> icons/yandex-logo.png" alt="yandex auth"> +<% + } + if (oauth_is_available_num(phr->config, 4)) { +%> +icons/oidc-logo.svg" alt="OIDC auth" height="46px"> <% } %> diff --git a/csp/contests/unpriv_login_page.csp b/csp/contests/unpriv_login_page.csp index 3ad0a7fe6b..0c00c228ce 100644 --- a/csp/contests/unpriv_login_page.csp +++ b/csp/contests/unpriv_login_page.csp @@ -143,6 +143,10 @@ + + + +

<% if (oauth_is_available_num(phr->config, 1)) { @@ -158,6 +162,11 @@ if (oauth_is_available_num(phr->config, 3)) { %> icons/yandex-logo.png" alt="yandex auth"> +<% + } + if (oauth_is_available_num(phr->config, 4)) { +%> +icons/oidc-logo.svg" alt="OIDC auth" height="46px"> <% } %> diff --git a/csp/super-server/login_page.csp b/csp/super-server/login_page.csp index 483f87f2f7..07ab405d5f 100644 --- a/csp/super-server/login_page.csp +++ b/csp/super-server/login_page.csp @@ -55,6 +55,14 @@ is_configured( + + + + + + + +

<% if (is_configured(phr->config, "google")) { @@ -65,6 +73,16 @@ is_configured( if (is_configured(phr->config, "vk")) { %> icons/vk-logo.jpeg" alt="vk auth" width="46"> +<% + } + if (is_configured(phr->config, "yandex")) { +%> +icons/yandex-logo.png" alt="yandex auth"> +<% + } + if (is_configured(phr->config, "oidc")) { +%> +icons/oidc-logo.svg" alt="OIDC auth" width="46"> <% } %> diff --git a/style/icons/oidc-logo.svg b/style/icons/oidc-logo.svg new file mode 100644 index 0000000000..1fad1c6c18 --- /dev/null +++ b/style/icons/oidc-logo.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file