-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
getting an argument error when trying to use omniauth #174
Comments
I am facing the exact same problem. I can overcome it by commenting our my own def resource_class. |
@greywolfz - is this still an issue with the latest beta? |
I am running with
My omniauth providers are defined in in ``controllers/api/vi/base_controller.rb` I am overriding the resources_class
The following error is returned:
If I comment out the definition authorization works, but other parts of my app do not. |
ArgumentError at /v1/documents/1.json
activesupport (4.1.8) lib/active_support/core_ext/class/attribute.rb, line 106 101 val
102 end
103
104 if instance_reader
105 remove_possible_method name
> 106 define_method(name) do
107 if instance_variable_defined?(ivar)
108 instance_variable_get ivar
109 else
110 self.class.public_send name
111 end App backtraceFull backtrace
Without omniauth When putting this |
@lynndylanhurley - also seeing the same issue. Made a quick PR ^ |
👍 DeviseTokenAuth::OmniauthCallbacksController.class_eval do
def resource_class(mapping = nil)
if omniauth_params
omniauth_params['resource_class'].constantize
end
end |
ArgumentError in DeviseTokenAuth::OmniauthCallbacksController#redirect_callbacks
wrong number of arguments (1 for 0)
Application Trace | Framework Trace | Full Trace
devise_token_auth (0.1.32.beta6) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:105:in
resource_class' devise_token_auth (0.1.32.beta6) app/controllers/devise_token_auth/concerns/set_user_by_token.rb:19:in
set_user_by_token'it seems like the set_user_by_token method is calling resource_class with an argument but it is not supposed to take an argument..
it also looks like omniauth_callbacks_controller.rb is supposed to skip the set_user_by_token callback but it doesnt seem to be doing so...
I also had this exact problem with 0.1.31...
Any ideas?
The text was updated successfully, but these errors were encountered: