Sha256: 6fc81b56fecf931baa38e33edf3e48e9fc5a2a98f527172ed34ad4049ef0f0d1

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

require 'omni_auth/multi_provider/handler'
require 'omni_auth/multi_provider/version'

module OmniAuth
  module MultiProvider
    def self.register(builder,
                      provider_name:,
                      path_prefix: ::OmniAuth.config.path_prefix,
                      identity_provider_id_regex:,
                      **options, &dynamic_options_generator)

      handler = OmniAuth::MultiProvider::Handler.new(path_prefix: path_prefix,
                                                     identity_provider_id_regex: identity_provider_id_regex,
                                                     &dynamic_options_generator)

      static_options = options.merge(path_prefix: path_prefix)

      builder.provider(provider_name, static_options.merge(handler.provider_options))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-multi-provider-0.1.0 lib/omni_auth/multi_provider.rb