From dd2b1bd4613d965830757b12a680f6fa04fdb748 Mon Sep 17 00:00:00 2001 From: Sergei Tsoganov Date: Tue, 26 May 2026 12:15:24 +0300 Subject: [PATCH] Added voog_footer gem usage and renamed tara --- .gitignore | 3 - Gemfile | 10 +- Gemfile.lock | 48 +- app/assets/stylesheets/menu/social.scss | 13 +- ...{tara_controller.rb => oidc_controller.rb} | 17 +- app/controllers/concerns/authentication.rb | 12 +- app/helpers/application_helper.rb | 1 + app/helpers/voog_footer_helper.rb | 437 ++++++++++++++++++ ...th_tara_checker.rb => omniauth_checker.rb} | 2 +- app/views/auth/sessions/new.html.erb | 2 +- app/views/common/_footer.html.erb | 68 ++- config/application.yml.sample | 15 +- config/cable.yml | 9 +- config/environments/production.rb | 8 +- config/environments/staging.rb | 17 + config/initializers/omniauth.rb | 34 +- config/initializers/voog_footer.rb | 16 + config/initializers/wicked_pdf.rb | 2 +- config/locales/common.en.yml | 64 ++- config/locales/common.et.yml | 62 ++- config/locales/en.yml | 12 + config/locales/et.yml | 12 + config/routes.rb | 20 +- ...roller_spec.rb => oidc_controller_spec.rb} | 4 +- .../auth/oidc_controller/callback.yml | 111 +++++ spec/helpers/voog_footer_helper_spec.rb | 375 +++++++++++++++ 26 files changed, 1228 insertions(+), 146 deletions(-) rename app/controllers/auth/{tara_controller.rb => oidc_controller.rb} (57%) create mode 100644 app/helpers/voog_footer_helper.rb rename app/services/api_connector/auth/{omniauth_tara_checker.rb => omniauth_checker.rb} (88%) create mode 100644 config/environments/staging.rb create mode 100644 config/initializers/voog_footer.rb rename spec/controllers/auth/{tara_controller_spec.rb => oidc_controller_spec.rb} (93%) create mode 100644 spec/fixtures/vcr_cassettes/controllers/auth/oidc_controller/callback.yml create mode 100644 spec/helpers/voog_footer_helper_spec.rb diff --git a/.gitignore b/.gitignore index 695ccc93..9c9ce174 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,3 @@ yarn-error.log .yarnrc.yml Dockerfile.dev -Dockerfile.dev.v2 - -Dockerfile.dev.v2 diff --git a/Gemfile b/Gemfile index dd066e0a..46f4d721 100644 --- a/Gemfile +++ b/Gemfile @@ -24,8 +24,8 @@ gem 'stimulus-rails' # Build JSON APIs with ease [https://github.com/rails/jbuilder] gem 'jbuilder' -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" +# Redis for Action Cable (production) and Rails.cache (production) +gem 'redis', '~> 5.0' # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] # gem "kredis" @@ -52,13 +52,15 @@ gem 'wicked' gem 'countries', require: 'countries/global' +# gem 'voog_footer', path: 'vendor/gems/voog_footer' +gem 'voog_footer', github: 'internetee/voog_footer' + gem 'wicked_pdf' gem 'wkhtmltopdf-binary', '~> 0.12.6.5' gem 'omniauth', '>=2.0.0' gem 'omniauth-rails_csrf_protection' -gem 'omniauth-tara', github: 'internetee/omniauth-tara' -# gem 'omniauth-tara', path: 'vendor/gems/omniauth-tara' +gem 'omniauth_openid_connect' gem 'coderay', '~> 1.1', '>= 1.1.2' diff --git a/Gemfile.lock b/Gemfile.lock index 2d8c6cca..5470c1ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,9 @@ GIT - remote: https://github.com/internetee/omniauth-tara.git - revision: d7babe56fe666739a0aca4bc94ddc8629641d220 + remote: https://github.com/internetee/voog_footer.git + revision: ddbaeef72f380d8798a4df69cc93039a343b66fd specs: - omniauth-tara (0.7.1) - omniauth (>= 1.9, < 3) - openid_connect (~> 2.2) + voog_footer (0.1.0) + nokogiri (~> 1.10) GEM remote: https://rubygems.org/ @@ -77,8 +76,9 @@ GEM addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) aes_key_wrap (1.1.0) - attr_required (1.0.1) - bindata (2.4.15) + attr_required (1.0.2) + base64 (0.3.0) + bindata (2.5.1) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) @@ -98,6 +98,7 @@ GEM launchy coderay (1.1.3) concurrent-ruby (1.2.2) + connection_pool (3.0.2) countries (5.6.0) unaccent (~> 0.3) crack (0.4.5) @@ -111,13 +112,15 @@ GEM reline (>= 0.3.1) diff-lcs (1.5.0) docile (1.4.0) + email_validator (2.2.4) + activemodel erubi (1.12.0) faker (3.2.1) i18n (>= 1.8.11, < 2) faraday (2.7.10) faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-follow_redirects (0.3.0) + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) faraday-net_http (3.0.2) fuubar (2.5.1) @@ -138,9 +141,10 @@ GEM activesupport (>= 5.0.0) jsbundling-rails (1.1.2) railties (>= 6.0.0) - json-jwt (1.16.3) + json-jwt (1.17.0) activesupport (>= 4.2) aes_key_wrap + base64 bindata faraday (~> 2.0) faraday-follow_redirects @@ -184,17 +188,20 @@ GEM omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - openid_connect (2.2.0) + omniauth_openid_connect (0.8.0) + omniauth (>= 1.9, < 3) + openid_connect (~> 2.2) + openid_connect (2.4.0) activemodel attr_required (>= 1.0.0) + email_validator faraday (~> 2.0) faraday-follow_redirects json-jwt (>= 1.16) - net-smtp + mail rack-oauth2 (~> 2.2) swd (~> 2.0) tzinfo - validate_email validate_url webfinger (~> 2.0) pagy (6.0.4) @@ -205,7 +212,7 @@ GEM nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) - rack-oauth2 (2.2.0) + rack-oauth2 (2.3.0) activesupport attr_required faraday (~> 2.0) @@ -247,6 +254,10 @@ GEM rake (13.0.6) rdoc (6.5.0) psych (>= 4.0.0) + redis (5.4.1) + redis-client (>= 0.22.0) + redis-client (0.29.0) + connection_pool regexp_parser (2.8.1) reline (0.3.8) io-console (~> 0.5) @@ -291,7 +302,7 @@ GEM stimulus-rails (1.2.2) railties (>= 6.0.0) stringio (3.0.8) - swd (2.0.2) + swd (2.0.3) activesupport (>= 3) attr_required (>= 0.0.5) faraday (~> 2.0) @@ -305,9 +316,6 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unaccent (0.4.0) - validate_email (0.1.6) - activemodel (>= 3.0) - mail (>= 2.2.5) validate_url (1.0.15) activemodel (>= 3.0.0) public_suffix @@ -317,7 +325,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webfinger (2.1.2) + webfinger (2.1.3) activesupport faraday (~> 2.0) faraday-follow_redirects @@ -360,10 +368,11 @@ DEPENDENCIES jwt omniauth (>= 2.0.0) omniauth-rails_csrf_protection - omniauth-tara! + omniauth_openid_connect pagy puma (~> 6.0) rails (~> 7.0.2, >= 7.0.2.2) + redis (~> 5.0) rspec-rails selenium-webdriver simplecov (= 0.22.0) @@ -372,6 +381,7 @@ DEPENDENCIES turbo-rails tzinfo-data vcr + voog_footer! web-console webmock wicked diff --git a/app/assets/stylesheets/menu/social.scss b/app/assets/stylesheets/menu/social.scss index 3b0a0942..1e04e90b 100644 --- a/app/assets/stylesheets/menu/social.scss +++ b/app/assets/stylesheets/menu/social.scss @@ -8,14 +8,13 @@ } ul { display: flex; + flex-wrap: wrap; align-items: center; + gap: 12px 16px; list-style: none; padding: 0; li { - margin-right: 20px; - &:last-child { - margin-right: 0; - } + margin-right: 0; a:not(.btn) { display: block; width: 40px; @@ -52,8 +51,9 @@ right: 40px; padding: 0; ul { + gap: 8px 10px; li { - margin-right: 10px; + margin-right: 0; a:not(.btn) { width: 30px; height: 30px; @@ -72,8 +72,9 @@ margin-top: 5px; border-top: 1px solid #EAEBED; ul { + gap: 8px 10px; li { - margin-right: 10px; + margin-right: 0; a:not(.btn) { width: 30px; height: 30px; diff --git a/app/controllers/auth/tara_controller.rb b/app/controllers/auth/oidc_controller.rb similarity index 57% rename from app/controllers/auth/tara_controller.rb rename to app/controllers/auth/oidc_controller.rb index 31ffb8f4..f1cc0acf 100644 --- a/app/controllers/auth/tara_controller.rb +++ b/app/controllers/auth/oidc_controller.rb @@ -1,22 +1,31 @@ module Auth - class TaraController < AuthController + class OidcController < AuthController before_action :require_no_authentication, only: :callback + # GET /auth/oidc/callback def callback - conn = ApiConnector::Auth::OmniauthTaraChecker.new(username: nil) - result = conn.call_action(params: tara_callback_params) + conn = ApiConnector::Auth::OmniauthChecker.new(username: nil) + result = conn.call_action(params: oidc_callback_params) handle_response(result); return if performed? create { user_payload } end + # GET /auth/oidc/cancel def cancel + message_key = params[:message] + + translated = if message_key.present? + I18n.t("omniauth.errors.#{message_key}", default: message_key.humanize) + end + + flash[:alert] = translated.presence || t(:sign_in_cancelled) redirect_to login_url end private - def tara_callback_params + def oidc_callback_params { auth: { uid: omniauth_user_hash.try(:uid), diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rb index 30f16fdb..6d332bda 100644 --- a/app/controllers/concerns/authentication.rb +++ b/app/controllers/concerns/authentication.rb @@ -15,8 +15,8 @@ def logged_in? end def sign_out + clear_auth_cache session[:uuid] = nil - clear_cache end def sign_in(uuid) @@ -59,9 +59,11 @@ def construct_auth_info(token, request_ip, data) } end - def clear_cache - Rails.cache.instance_variable_get(:@data)&.each_key do |key| - Rails.cache.delete(key) unless key.match?(/distribution_data|growth_rate_data/) - end + # Auth session payload (uuid) and bulk-change wizard state (session.id) only. + # Leaves stats (distribution_data, growth_rate_data) and Voog footer (voog_footer/links/*) intact. + def clear_auth_cache + auth_uuid = session[:uuid] + Rails.cache.delete(auth_uuid) if auth_uuid.present? + Rails.cache.delete(session.id) end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e8c23050..7abdf3a7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,6 @@ module ApplicationHelper include Pagy::Frontend + include VoogFooterHelper CONTACT_TYPE = { tech: 'TechDomainContact', diff --git a/app/helpers/voog_footer_helper.rb b/app/helpers/voog_footer_helper.rb new file mode 100644 index 00000000..1a0009aa --- /dev/null +++ b/app/helpers/voog_footer_helper.rb @@ -0,0 +1,437 @@ +# frozen_string_literal: true + +require "uri" + +module VoogFooterHelper + FOOTER_SOCIAL_KEYS = %i[facebook twitter youtube linkedin instagram spotify rss].freeze + + FOOTER_SOCIAL_ICONS = { + 'facebook' => 'fab fa-facebook-square', + 'twitter' => 'fab fa-twitter', + 'youtube' => 'fab fa-youtube-square', + 'linkedin' => 'fab fa-linkedin', + 'instagram' => 'fab fa-instagram', + 'spotify' => 'fab fa-spotify', + 'rss' => 'fas fa-rss-square' + }.freeze + + SOCIAL_HOST_KEYS = { + 'facebook.com' => 'facebook', + 'twitter.com' => 'twitter', + 'x.com' => 'twitter', + 'linkedin.com' => 'linkedin', + 'youtube.com' => 'youtube', + 'instagram.com' => 'instagram', + 'spotify.com' => 'spotify', + 'open.spotify.com' => 'spotify' + }.freeze + + # Voog may list these keys, but the app renders them separately (see FOOTER_INJECTED_LINKS). + FOOTER_VOOG_SKIP_SLOTS = %i[ + cookie_settings cookies_on_internet_ee_webpage kupsised_internet_ee_lehel accessibility + ligipaasetavus 2025 become_a_ee_elite_partner_2 + ].freeze + + # App-only links inserted after a Voog-mapped slot (not taken from Voog URLs/text). + FOOTER_INJECTED_LINKS = [ + { key: :cookie_settings, after: :content_management_principles } + ].freeze + + # Static column layout when Voog is disabled (order preserved). + FOOTER_NAV_COLUMNS_FALLBACK = [ + { + title_key: :help_and_info, + links: %i[ + domain_regulation faq statistics dispute_committee + data_protection_policy content_management_principles + ] + }, + { + title_key: :registrars, + links: %i[ + list_of_accredited_registrars + terms_and_conditions_for_registrars + partner_programme + ] + }, + { + title_key: :estonian_internet, + links: %i[ + contact_us management documents newsletter + information_security_principles + ] + } + ].freeze + + # App footer slots -> Voog path-derived keys (EN first, then ET). Inspect: voog_footer_available_link_keys + FOOTER_LINK_VOOG_KEYS = { + domain_regulation: %w[ee_domain_regulation ee_domeenireeglid], + faq: %w[faq kkk], + statistics: %w[statistics statistika], + dispute_committee: %w[domain_disputes domeenivaidluste_komisjon], + data_protection_policy: %w[ + eif_s_data_protection_policy + eis_i_isikuandmete_kasutamise_alused + ], + cookie_settings: %w[cookie_settings kuupäeviku_seaded], + content_management_principles: %w[ + principles_for_the_content_management_of_estonian_internet + sisu_haldamise_pohimotted_eesti_internetis + ], + list_of_accredited_registrars: %w[accredited_registrars akrediteeritud_registripidajad], + terms_and_conditions_for_registrars: %w[ + terms_and_conditions_for_becoming_a_registrar + kuidas_saada_ee_akrediteeritud_registripidajaks + ], + partner_programme: %w[ + become_a_ee_elite_partner + kuidas_saada_ee_elite_partneriks + ], + contact_us: %w[eif eis], + management: %w[tasks_and_management ulesanded_juhatus_ja_noukogu], + documents: %w[documents dokumendid], + newsletter: %w[newsletter uudiskiri], + information_security_principles: %w[ + information_security_principles + infoturbe_pohimotted_eesti_interneti_sihtasutuses + ] + }.freeze + + def footer_link(key) + footer_link_url(key) + end + + def footer_link_url(key) + key = key.to_sym + return i18n_footer_link_url(key) || '#' if key == :cookie_settings + + voog_key = resolve_voog_footer_key(key) + voog_footer_links_by_key[voog_key]&.dig('url') || + i18n_footer_link_url(key) || + '#' + end + + def footer_link_label(key) + key = key.to_s + voog_key = resolve_voog_footer_key(key) + i18n_footer_link_label(key).presence || + (voog_footer_enabled? && voog_footer_links_by_key[voog_key]&.dig('text').presence) || + key.tr('_', ' ').capitalize + end + + def footer_navigation_columns + columns = voog_footer_navigation_columns.presence || footer_navigation_columns_fallback + inject_footer_special_links(columns) + end + + def footer_social_column_title + return t('common.footer.social_media') unless voog_footer_enabled? + + voog_social_column&.dig('name').presence || t('common.footer.social_media') + end + + def footer_social_links + voog_links = voog_social_links_from_structure + if voog_links.present? + return voog_links.filter_map { |link| build_footer_social_link(link) } + end + + FOOTER_SOCIAL_KEYS.filter_map do |key| + url = i18n_footer_link_url(key) + next if url.blank? + + { + key: key, + url: url, + title: footer_social_title(key), + icon_class: footer_social_icon_class(key) + } + end + end + + def footer_highlight_title + voog_footer_structure&.dig('highlight', 'title').presence || + t('common.footer.copyright') + end + + def footer_highlight_info + info = voog_footer_structure&.dig('highlight', 'info') + if info.present? + sanitize(info, tags: %w[br]) + else + safe_join( + [t('common.footer.address'), t('common.footer.registration_code')], + tag.br + ) + end + end + + def footer_email_href + contact_url_for('email', type: 'email') || 'mailto:info@internet.ee' + end + + def footer_email_text + contact_text_for('email', type: 'email') || 'info@internet.ee' + end + + def footer_phone_text + contact = voog_footer_contacts.find { |c| c['type'] == 'phone' || c['key'].to_s.start_with?('phone') } + contact&.dig('text').presence || '727 1000' + end + + def footer_logo_url + VoogFooter.configuration.site_url.presence || 'https://internet.ee' + end + + def voog_footer_available_link_keys + voog_footer_links_by_key.keys.sort + end + + private + + def voog_footer_enabled? + VoogFooter.configuration.enabled + end + + def voog_footer_structure + return @voog_footer_structure if defined?(@voog_footer_structure) + + @voog_footer_structure = if voog_footer_enabled? + VoogFooter.structure&.dig(I18n.locale.to_s) + end + end + + def voog_footer_links_by_key + return @voog_footer_links_by_key if defined?(@voog_footer_links_by_key) + + @voog_footer_links_by_key = {} + structure = voog_footer_structure + return @voog_footer_links_by_key unless structure + + structure['columns']&.each do |column| + column['links']&.each { |link| store_voog_link(link) } + column['social_links']&.each { |link| store_voog_link(link) } + end + structure['highlight']&.fetch('contacts', [])&.each { |contact| store_voog_link(contact) } + structure['extras']&.each { |extra| store_voog_link(extra) } + @voog_footer_links_by_key + end + + def store_voog_link(link) + key = link['key'] + return if key.blank? + + @voog_footer_links_by_key[key] = link + end + + def resolve_voog_footer_key(key) + key_s = key.to_s + return key_s if voog_footer_links_by_key.key?(key_s) + + aliases = FOOTER_LINK_VOOG_KEYS[key.to_sym] + return key_s unless aliases + + aliases.find { |candidate| voog_footer_links_by_key.key?(candidate) } || key_s + end + + def voog_footer_navigation_columns + return [] unless voog_footer_structure + + voog_footer_structure['columns'].filter_map do |column| + next if column['follow_us'] + + links = column['links']&.filter_map { |link| build_footer_nav_link(link) } + next if links.blank? + + { + name: column['name'].presence, + links: links + } + end + end + + def footer_navigation_columns_fallback + FOOTER_NAV_COLUMNS_FALLBACK.filter_map do |column| + links = column[:links].filter_map { |key| build_footer_nav_link_from_slot(key) } + next if links.blank? + + { + name: t("common.footer.#{column[:title_key]}"), + links: links + } + end + end + + def inject_footer_special_links(columns) + FOOTER_INJECTED_LINKS.each do |spec| + inject_footer_nav_link(columns, spec[:key], after: spec[:after]) + end + columns + end + + def inject_footer_nav_link(columns, key, after:) + link = build_footer_nav_link_from_slot(key) + return columns unless link + + columns.each do |column| + next if column[:links].any? { |entry| entry[:key] == key } + + anchor_index = column[:links].index { |entry| entry[:key] == after } + next unless anchor_index + + column[:links].insert(anchor_index + 1, link) + return columns + end + + columns + end + + def build_footer_nav_link_from_slot(key) + url = footer_link_url(key) + return nil if url.blank? || url == '#' + + { + key: key, + url: url, + label: footer_link_label(key), + html_options: footer_nav_link_html_options(key) + } + end + + def build_footer_nav_link(voog_link) + voog_key = voog_link['key'] + return nil if voog_key.blank? + + app_slot = app_slot_for_voog_key(voog_key) + return nil if footer_voog_skip_slot?(voog_key: voog_key, app_slot: app_slot) + + url = voog_link['url'].presence || footer_link_url(app_slot) + return nil if url.blank? || url == '#' + + { + key: app_slot, + url: url, + label: footer_nav_link_label(app_slot, voog_link), + html_options: footer_nav_link_html_options(app_slot) + } + end + + def footer_nav_link_label(app_slot, voog_link) + i18n_footer_link_label(app_slot.to_s).presence || + voog_link['text'].presence || + app_slot.to_s.tr('_', ' ').capitalize + end + + def footer_nav_link_html_options(key) + return cookie_settings_link_html_options if key.to_sym == :cookie_settings + + { target: '_blank', rel: 'noopener' } + end + + def cookie_settings_link_html_options + { + target: '_blank', + rel: 'noopener', + title: footer_link_label(:cookie_settings), + 'data-cc': 'c-settings' + } + end + + def footer_voog_skip_slot?(voog_key: nil, app_slot: nil) + slot = app_slot || app_slot_for_voog_key(voog_key) + FOOTER_VOOG_SKIP_SLOTS.include?(slot) + end + + def app_slot_for_voog_key(voog_key) + key_s = voog_key.to_s + FOOTER_LINK_VOOG_KEYS.each do |slot, aliases| + return slot if aliases.include?(key_s) + end + + return key_s.to_sym if i18n_footer_link_label(key_s).present? || i18n_footer_link_url(key_s).present? + + key_s.to_sym + end + + def voog_social_column + voog_footer_structure&.dig('columns')&.find { |column| column['follow_us'] } + end + + def voog_social_links_from_structure + voog_social_column&.dig('social_links') + end + + def voog_footer_contacts + voog_footer_structure&.dig('highlight', 'contacts') || [] + end + + def contact_url_for(key, type: nil) + contact = voog_footer_contacts.find do |entry| + entry['key'] == key || (type && entry['type'] == type) + end + contact&.dig('url') + end + + def contact_text_for(key, type: nil) + contact = voog_footer_contacts.find do |entry| + entry['key'] == key || (type && entry['type'] == type) + end + contact&.dig('text').presence + end + + def i18n_footer_link_url(key) + t("common.footer.links.#{key}", default: nil).presence + end + + def footer_social_title(key) + footer_link_label(key) + end + + def i18n_footer_link_label(key) + t("common.footer.labels.#{key}", default: '').presence || + t("common.footer.social.#{key}", default: '').presence + end + + def footer_social_icon_class(key) + FOOTER_SOCIAL_ICONS.fetch(key.to_s, 'fas fa-external-link-alt') + end + + def build_footer_social_link(link) + url = link['url'].presence + return nil if url.blank? + + key = social_key_for(link)&.to_sym + return nil unless key + + { + key: key, + url: url, + title: footer_social_title(key), + icon_class: footer_social_icon_class(key) + } + end + + def social_key_for(link) + icon_name = link.dig('icon', 'name').presence + return icon_name if icon_name && FOOTER_SOCIAL_ICONS.key?(icon_name) + + host_key = social_key_from_url(link['url']) + return host_key if host_key + + parsed_key = link['key'].to_s + parsed_key if FOOTER_SOCIAL_ICONS.key?(parsed_key) + end + + def social_key_from_url(url) + host = URI.parse(url).host.to_s.sub(/\Awww\./, "").downcase + return nil if host.empty? + + SOCIAL_HOST_KEYS.each do |domain, key| + return key if host == domain || host.end_with?(".#{domain}") + end + + nil + rescue URI::InvalidURIError + nil + end +end diff --git a/app/services/api_connector/auth/omniauth_tara_checker.rb b/app/services/api_connector/auth/omniauth_checker.rb similarity index 88% rename from app/services/api_connector/auth/omniauth_tara_checker.rb rename to app/services/api_connector/auth/omniauth_checker.rb index c84d0796..f053f8f9 100644 --- a/app/services/api_connector/auth/omniauth_tara_checker.rb +++ b/app/services/api_connector/auth/omniauth_checker.rb @@ -2,7 +2,7 @@ class ApiConnector module Auth - class OmniauthTaraChecker < ApiConnector + class OmniauthChecker < ApiConnector ACTION = 'check_omniauth_user_info' ENDPOINT = { method: 'post', diff --git a/app/views/auth/sessions/new.html.erb b/app/views/auth/sessions/new.html.erb index 0134473e..c2ce45cb 100644 --- a/app/views/auth/sessions/new.html.erb +++ b/app/views/auth/sessions/new.html.erb @@ -17,7 +17,7 @@

<%= t('.login_with_id_text') %>

-

<%= button_to t('.login_with_id'), '/auth/tara', data: { turbo: false }, class: 'button button--primary' %>

+

<%= button_to t('.login_with_id'), "/auth/oidc?ui_locales=#{I18n.locale}", data: { turbo: false }, class: 'button button--primary' %>

diff --git a/app/views/common/_footer.html.erb b/app/views/common/_footer.html.erb index 7e1d1217..0652664b 100644 --- a/app/views/common/_footer.html.erb +++ b/app/views/common/_footer.html.erb @@ -1,56 +1,50 @@