|
17 | 17 | <% end %> |
18 | 18 | <% if devise_mapping.omniauthable? %> |
19 | 19 | <div class="space-y-4"> |
20 | | - <%= form_for '', url: omniauth_authorize_path(resource_name, :google_oauth2), data: { turbo: false }, method: :post do |f| %> |
21 | | - <set-timezone data-input-id="state" data-params="true"></set-timezone> |
22 | | - <%= hidden_field_tag :state, { redir: params[:redir].to_s }.compact_blank.to_query %> |
23 | | - <%= f.button button_title(title: 'Sign up with Google', icon: svg_icon('brand_google', class: 'w-6 h-6')), class: 'white-button w-full mt-4' %> |
| 20 | + <% if User.omniauth_providers.include?(:google_oauth2) %> |
| 21 | + <%= form_for '', url: omniauth_authorize_path(resource_name, :google_oauth2), data: { turbo: false }, method: :post do |f| %> |
| 22 | + <set-timezone data-input-id="state" data-params="true"></set-timezone> |
| 23 | + <%= hidden_field_tag :state, { redir: params[:redir].to_s }.compact_blank.to_query %> |
| 24 | + <%= f.button button_title(title: 'Sign up with Google', icon: svg_icon('brand_google', class: 'w-6 h-6')), class: 'white-button w-full mt-4' %> |
| 25 | + <% end %> |
24 | 26 | <% end %> |
25 | | - <%= form_for '', url: omniauth_authorize_path(resource_name, :microsoft_office365), data: { turbo: false }, method: :post do |f| %> |
26 | | - <set-timezone data-input-id="state_microsoft" data-params="true"></set-timezone> |
27 | | - <%= hidden_field_tag :state, { redir: params[:redir].to_s }.compact_blank.to_query, id: 'state_microsoft' %> |
28 | | - <%= f.button button_title(title: 'Sign up with Microsoft', icon: svg_icon('brand_microsoft', class: 'w-6 h-6')), class: 'white-button w-full' %> |
| 27 | + <% if User.omniauth_providers.include?(:microsoft_office365) %> |
| 28 | + <%= form_for '', url: omniauth_authorize_path(resource_name, :microsoft_office365), data: { turbo: false }, method: :post do |f| %> |
| 29 | + <set-timezone data-input-id="state_microsoft" data-params="true"></set-timezone> |
| 30 | + <%= hidden_field_tag :state, { redir: params[:redir].to_s }.compact_blank.to_query, id: 'state_microsoft' %> |
| 31 | + <%= f.button button_title(title: 'Sign up with Microsoft', icon: svg_icon('brand_microsoft', class: 'w-6 h-6')), class: 'white-button w-full' %> |
| 32 | + <% end %> |
29 | 33 | <% end %> |
30 | 34 | </div> |
31 | 35 | <% end %> |
|
0 commit comments