-
Notifications
You must be signed in to change notification settings - Fork 1.1k
'RuntimeError in DeviseTokenAuth::OmniauthCallbacksController#omniauth_success' with omniauth-facebook #910
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
Comments
i get the same error occasionally... so far, i can't find any clues about how/why requests fail... 1 time in thousands fails... very odd |
the same thing happens to me with a custom omniauth strategy (oauth2) and https://github.com/zquestz/omniauth-google-oauth2 actually not able to understand what is going on and why it is failing, not currently able to successfully get back to my API that is using devise_token_auth since it always complains about |
@yortz are you overriding the controllers? If so you may be able to see why no resource class is being found? |
@zachfeldman thx for your quick reply, actually that is not the problem, I was trying with or without the override, but it looks like each and every time I got back to my api
so this is breaking the
since those are no matter what always nil ????
Really not sure why... |
Quick update, hoping that this could save some other people time, for me with a custom oauth2 provider the workaround to fix this error was to define the |
rails 5.0.3
gem 'devise'
gem 'devise_token_auth', :git => 'git://github.com/lynndylanhurley/devise_token_auth.git'
gem 'omniauth'
gem 'omniauth-facebook'
When I did "facebook login" with JS SDK(Client side flow), did callback below in "FB.login"
$.getJSON('/api/v1/auth/facebook/callback', function(json) {
console.log(json);
});
then I got below
'RuntimeError in DeviseTokenAuth::OmniauthCallbacksController#omniauth_success'
raised 'No resource_class found'
/devise_token_auth/omniauth_callbacks_controller.rb:109:in `resource_class'
Parameters:
{"provider"=>"facebook"}
Toggle session dump
_csrf_token: "B5dLxdaxxxxxxxxxxxxxxxxxxxxUkwxsdbV5ffLKUE2/9zStM="
flash: {"discard"=>[], "flashes"=>{"notice"=>"Signed in successfully."}}
omniauth.params: {"resource_class"=>"User"}
omniauth.state: "8ce127b72794xxxxxxxxxxxxxxxxxxxxec38501ed5d11baf"
session_id: "ca70xxxxxxxxxxxxxxxxxxxx0707d053"
warden.user.user.key: [[1], "$2a$11$fTN9xxxxxxxxxxxxxxQile"]
Toggle env dump
GATEWAY_INTERFACE: "CGI/1.1"
HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8"
HTTP_ACCEPT_ENCODING: "gzip, deflate, sdch, br"
HTTP_ACCEPT_LANGUAGE: "ja,en-US;q=0.8,en;q=0.6"
HTTP_CACHE_CONTROL: "max-age=0"
HTTP_VERSION: "HTTP/1.1"
ORIGINAL_SCRIPT_NAME: ""
REMOTE_ADDR: "::1"
REMOTE_HOST: "::1"
SERVER_NAME: "localhost"
SERVER_PROTOCOL: "HTTP/1.1"
The text was updated successfully, but these errors were encountered: