docbrown/app/helpers/authentication_helper.rb
rhymes 8407bf9b4e
[deploy] Authentication refactoring: cleanups (#7576)
* Use Devise registry to list available providers

* Cleanups following Devise+Omniauth docs

* More cleanups

* Use helpers

* More cleanups

* Oops, forgot to remove these specs
2020-04-29 10:33:30 -04:00

11 lines
300 B
Ruby

module AuthenticationHelper
def authentication_provider(provider_name)
Authentication::Providers.get!(provider_name)
end
def authentication_enabled_providers
Authentication::Providers.enabled.map do |provider_name|
Authentication::Providers.get!(provider_name)
end
end
end