docbrown/app/views/users/_additional_authentication.html.erb
Ben Halpern 55701f4303
Fix Twitter/X consistency (#20918)
* Fix Twitter/X consistency

* Adjust tests

* Adjust test regex
2024-05-03 12:24:06 -04:00

20 lines
1.1 KiB
Text

<% unless @user.authenticated_with_all_providers? %>
<div class="crayons-card crayons-card--content-rows block">
<% authentication_enabled_providers.each do |provider| %>
<!--
INFO: [@forem/oss] We only support creating new accounts and then
signing in with them) using Apple Auth. Connecting Forem existing
accounts to Apple Auth isn't supported and is why we skip it here.
-->
<% next if provider.provider_name == :apple %>
<% unless @user.authenticated_through?(provider.provider_name) %>
<%= form_with url: provider.sign_in_path(state: "profile", origin: URL.url("/settings")), class: "flex w-100", local: true do |f| %>
<%= f.button type: :submit, class: "crayons-btn crayons-btn--icon-left crayons-btn--brand-#{provider.provider_name} m-1 w-100" do %>
<%= crayons_icon_tag(provider.provider_name, title: provider.official_name) %>
<%= t("views.settings.account.connect", provider: provider.official_name) %>
<% end %>
<% end %>
<% end %>
<% end %>
</div>
<% end %>