forked from External/greenlight
initial commit
This commit is contained in:
14
app/helpers/application_helper.rb
Normal file
14
app/helpers/application_helper.rb
Normal file
@ -0,0 +1,14 @@
|
||||
module ApplicationHelper
|
||||
|
||||
# Gets all configured omniauth providers.
|
||||
def configured_providers
|
||||
Rails.configuration.providers.select do |provider|
|
||||
Rails.configuration.send("omniauth_#{provider}")
|
||||
end
|
||||
end
|
||||
|
||||
# Generates the login URL for a specific provider.
|
||||
def omniauth_login_url(provider)
|
||||
"/auth/#{provider}"
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user