docbrown/app/views/users/_additional_authentication.html.erb
rhymes c7c498834f
[deploy] Authentication refactoring: generalize account settings (#7597)
* Rename remove_association to remove_identity and future proof its tests

* Use the signin_path everywhere

* Generalize account settings

* Use delegation
2020-04-30 17:29:53 +02:00

16 lines
546 B
Text

<% authentication_enabled_providers.each do |provider| %>
<% unless @user.identities.exists?(provider: provider.provider_name) %>
<a
href="<%= provider.sign_in_path(state: "profile") %>"
class="crayons-btn crayons-btn--outlined mr-2"
data-no-instant>
<%= inline_svg_tag(
"#{provider.provider_name}.svg",
aria: true,
class: "crayons-icon",
title: provider.official_name,
) %>
Connect <%= provider.official_name %> Account
</a>
<% end %>
<% end %>