* Add Providers(.available|.enabled|.enabled?) * Add provider_sidebar partial * Add providers_signup_modal partial and Providers.sign_in_url * Use path helpers * Add providers_nav_menu partial * Add providers_registration_form partial * Generalize users/additional_authentication * Refactor sign_in_path and authentication_path * Add .official_name and fix specs * Preload authentication providers correctly and use less Ruby magic * Put require_dependency in the correct place
17 lines
632 B
Text
17 lines
632 B
Text
<% Authentication::Providers.enabled.each do |provider_name| %>
|
|
<% unless @user.identities.exists?(provider: provider_name) %>
|
|
<% provider = Authentication::Providers.get!(provider_name) %>
|
|
<a
|
|
href="<%= Authentication::Providers.authentication_path(provider_name) %>"
|
|
class="crayons-btn crayons-btn--outlined mr-2"
|
|
data-no-instant>
|
|
<%= inline_svg_tag(
|
|
"#{provider_name}.svg",
|
|
aria: true,
|
|
class: "crayons-icon",
|
|
title: provider_name.to_s.titleize.to_s,
|
|
) %>
|
|
Connect <%= provider.official_name %> Account
|
|
</a>
|
|
<% end %>
|
|
<% end %>
|