forked from External/greenlight
* <Added omniauth for office365> * <Fixed code style> * Update puma.rb * <Inserted link to documentation>
This commit is contained in:
@ -60,7 +60,12 @@ class User < ApplicationRecord
|
||||
|
||||
# Provider attributes.
|
||||
def auth_name(auth)
|
||||
auth['info']['name']
|
||||
case auth['provider']
|
||||
when :microsoft_office365
|
||||
auth['info']['display_name']
|
||||
else
|
||||
auth['info']['name']
|
||||
end
|
||||
end
|
||||
|
||||
def auth_username(auth)
|
||||
@ -83,7 +88,7 @@ class User < ApplicationRecord
|
||||
when :twitter
|
||||
auth['info']['image'].gsub("http", "https").gsub("_normal", "")
|
||||
else
|
||||
auth['info']['image']
|
||||
auth['info']['image'] unless auth['provider'] == :microsoft_office365
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -41,6 +41,12 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if configured_providers.include? :microsoft_office365 %>
|
||||
<%= link_to omniauth_login_url(:microsoft_office365), class: "btn btn-pill btn-primary btn-block" do %>
|
||||
<i class="fab fa-windows"></i> <%= t("modal.login.with", provider: "Office365") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="or-line my-6">
|
||||
<div>
|
||||
<span class="text-uppercase">
|
||||
|
@ -40,6 +40,12 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if configured_providers.include? :microsoft_office365 %>
|
||||
<%= link_to omniauth_login_url(:microsoft_office365), class: "btn btn-pill btn-primary btn-block" do %>
|
||||
<i class="fab fa-windows"></i> <%= t("signup.with", provider: "Office365") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="or-line my-3">
|
||||
<div>
|
||||
<span class="text-uppercase" style="background-color: #F5F7FB;">
|
||||
|
Reference in New Issue
Block a user