20 lines
1.1 KiB
Text
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 %>
|