You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user tries to login with facebook, but then hits "Cancel" on the screen that says "... wants access to your profile", then I get the following error:
ActionController::RoutingError: No route matches [GET] "/omniauth/failure"
Running rake routes, I can see that api/auth/failure is setup and points at the omniauth_failure action , but '/omniauth/failure' is not set up
api_auth_failure GET /api/auth/failure(.:format) devise_token_auth/omniauth_callbacks#omniauth_failure
Digging into the omniauth gem, I find this code in omniauth-1.2.2/lib/omniauth/failure_endpoint.rb:
def call
raise_out! if OmniAuth.config.failure_raise_out_environments.include?(ENV['RACK_ENV'].to_s)
redirect_to_failure
end
...
def redirect_to_failure
message_key = env['omniauth.error.type']
new_path = "#{env['SCRIPT_NAME']}#{OmniAuth.config.path_prefix}/failure?message=#{message_key}#{origin_query_param}#{strategy_name_query_param}"
Rack::Response.new(['302 Moved'], 302, 'Location' => new_path).finish
end
So it looks like omniauth is generating that /omniauth/failure path based on the value of the omniauth_prefix, but devise_token_auth is not setting that path up.
The text was updated successfully, but these errors were encountered:
I am using 'omniauth' (which I believe is the default) as my omniauth prefix:
My routes are setup at api/auth:
If a user tries to login with facebook, but then hits "Cancel" on the screen that says "... wants access to your profile", then I get the following error:
Running
rake routes
, I can see that api/auth/failure is setup and points at the omniauth_failure action , but '/omniauth/failure' is not set upDigging into the omniauth gem, I find this code in omniauth-1.2.2/lib/omniauth/failure_endpoint.rb:
So it looks like omniauth is generating that /omniauth/failure path based on the value of the omniauth_prefix, but devise_token_auth is not setting that path up.
The text was updated successfully, but these errors were encountered: