We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to setup like so:
AUTH0_SETUP = lambda do |env| req = Rack::Request.new(env) namespace = 'foobar.auth0.com' site = "https://#{namespace}" client_info_querystring = "..." env['omniauth.strategy'].options[:client_id] = 'some-id' env['omniauth.strategy'].options[:client_secret] = 'some-secret' env['omniauth.strategy'].options[:namespace] = namespace env['omniauth.strategy'].options[:provider_ignores_state] = { callback_path: "/auth/auth0/callback" } env['omniauth.strategy'].options[:client_options] .merge!(site: site, authorize_url: "#{site}/authorize?#{client_info_querystring}", token_url: "#{site}/oauth/token?#{client_info_querystring}", userinfo_url: "#{site}/userinfo") end Rails.application.config.middleware.use OmniAuth::Builder do provider :auth0, setup: AUTH0_SETUP end
but this does not work because OmniAuth::Strategies::Auth0::initialize depends on args and has a check on argument
OmniAuth::Strategies::Auth0::initialize
args
fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) if @options[: namespace].nil?
but in case of setup args will be [{setup: <Proc>}] and will not have the namespace it needs
setup
[{setup: <Proc>}]
namespace
other Omniauth strategies like facebook use the option class method to configure it and do not use the initialize method
facebook
option
initialize
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I am trying to setup like so:
but this does not work because
OmniAuth::Strategies::Auth0::initialize
depends onargs
and has a check on argument
fail(ArgumentError.new("Received wrong number of arguments. #{args.inspect}")) if @options[: namespace].nil?
but in case of
setup
args will be[{setup: <Proc>}]
and will not have thenamespace
it needsother Omniauth strategies like
facebook
use theoption
class method to configure itand do not use the
initialize
methodThe text was updated successfully, but these errors were encountered: