isaacsanders / omniauth-stripe-connect

Stripe Connect OAuth2 Strategy for OmniAuth 1.0
MIT License
130 stars 75 forks source link

Redirect_url not working ... Please help #19

Closed iftikhar0005 closed 8 years ago

iftikhar0005 commented 10 years ago

I tried the redirect link just like this : <%= link_to "stripe", user_omniauth_authorize_path(:stripe_connect) %> but it breaks with this error.

Error: screen shot 2013-11-07 at 3 27 25 pm

No route matches {:controller=>"omniauth_callbacks", :action=>"passthru", :provider=>:stripe_connect}

It works if i manually redirect by putting this in the url: localhost:3000/users/auth/stripe_connect

Routes:

controllers: {:omniauth_callbacks => "omniauth_callbacks", :registrations => 'registrations'}

Trace

Processing by RegistrationsController#new as HTML
  Rendered devise/shared/_links.erb (1.6ms)
  Rendered devise/registrations/new.html.erb within layouts/application (92.5ms)
Completed 500 Internal Server Error in 183ms

ActionController::RoutingError - No route matches {:controller=>"omniauth_callbacks", :action=>"passthru", :provider=>:stripe_connect}:
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:540:in `raise_routing_error'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:536:in `rescue in generate'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:528:in `generate'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:569:in `generate'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:594:in `url_for'
  actionpack (3.2.14) lib/action_dispatch/routing/url_for.rb:148:in `url_for'
  actionpack (3.2.14) lib/action_view/helpers/url_helper.rb:107:in `url_for'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:216:in `user_omniauth_authorize_path'
  app/views/devise/registrations/new.html.erb:37:in `_app_views_devise_registrations_new_html_erb___4046438269320079111_70327266385080'
  actionpack (3.2.14) lib/action_view/template.rb:145:in `block in render'
  activesupport (3.2.14) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.14) lib/action_view/template.rb:143:in `render'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:48:in `block (2 levels) in render_template'
  actionpack (3.2.14) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.14) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.14) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:47:in `block in render_template'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:55:in `render_with_layout'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:46:in `render_template'
  actionpack (3.2.14) lib/action_view/renderer/template_renderer.rb:19:in `render'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:160:in `block in render_with_newrelic'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/method_tracer.rb:259:in `trace_execution_scoped'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:159:in `render_with_newrelic'
  actionpack (3.2.14) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.14) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.14) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.14) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.14) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.14) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
  activesupport (3.2.14) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
  /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (3.2.14) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.14) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  sunspot_rails (2.0.0) lib/sunspot/rails/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:39:in `render'
  actionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (3.2.14) lib/action_controller/metal/responder.rb:232:in `default_render'
  actionpack (3.2.14) lib/action_controller/metal/responder.rb:160:in `to_html'
  actionpack (3.2.14) lib/action_controller/metal/responder.rb:153:in `respond'
  actionpack (3.2.14) lib/action_controller/metal/responder.rb:146:in `call'
  actionpack (3.2.14) lib/action_controller/metal/mime_responds.rb:239:in `respond_with'
  devise (2.2.4) app/controllers/devise/registrations_controller.rb:8:in `new'
  actionpack (3.2.14) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.14) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.14) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.14) lib/active_support/callbacks.rb:458:in `_run__4260784046091546156__process_action__2728319539667779699__callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.14) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.14) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.14) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.14) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.14) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  activerecord (3.2.14) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:38:in `block in process_action'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:324:in `perform_action_with_newrelic_trace'
  newrelic_rpm (3.6.7.159) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:37:in `process_action'
  actionpack (3.2.14) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.14) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.14) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.14) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.14) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:36:in `call'
  actionpack (3.2.14) lib/action_dispatch/routing/mapper.rb:43:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.14) lib/action_dispatch/routing/route_set.rb:608:in `call'
  omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
  omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
  omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.1.4) lib/omniauth/strategy.rb:184:in `call!'
  omniauth (1.1.4) lib/omniauth/strategy.rb:164:in `call'
  newrelic_rpm (3.6.7.159) lib/new_relic/rack/error_collector.rb:43:in `call'
  newrelic_rpm (3.6.7.159) lib/new_relic/rack/agent_hooks.rb:22:in `call'
  newrelic_rpm (3.6.7.159) lib/new_relic/rack/browser_monitoring.rb:16:in `call'
  newrelic_rpm (3.6.7.159) lib/new_relic/rack/developer_mode.rb:28:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.14) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.14) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `_run__240951390623089305__call__1109229001885598089__callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.14) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.14) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.14) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  better_errors (0.9.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (0.9.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (0.9.0) lib/better_errors/middleware.rb:56:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.14) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.14) lib/action_dispatch/middleware/static.rb:63:in `call'
  railties (3.2.14) lib/rails/engine.rb:484:in `call'
  railties (3.2.14) lib/rails/application.rb:231:in `call'
  rack (1.4.5) lib/rack/content_length.rb:14:in `call'
  railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call'
  rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
  /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
  /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
  /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

Please help me out here.. I have a project due today.. Really need some help. Thank you.

isaacsanders commented 9 years ago

@iftikhar0005 @murtali @TrevorHinesley @cmalpeli

Just released v2.8.0.

Please tell me if the issue persists. We can reopen from there.

ghost commented 9 years ago

I'm also getting

No route matches {:action=>"passthru", :controller=>"omniauth_callbacks", :format=>nil, :provider=>:stripe_connect} missing required keys: [:provider]

Using 2.9.0. It didn't work in 2.6.0 either.

ghost commented 9 years ago

I've tried adding:

devise :omniauth_providers => [:stripe_connect]

to User.rb. Now i get the following:

Not found. Authentication passthru.

ghost commented 9 years ago

Never mind. The config.omniauth :stripe_connect line was missing from my devise file. All works now.

darraghmonaghan commented 8 years ago

Similar to this theme, has anybody ever encountered problems with the response part of the OAuth cycle?

At present, users can sign in to the their Stripe account via OAuth, but on the redirect, they following error renders:

"No route matches [GET] "/oauth/callback" "

Does anyone have any experience with this, or ideas as to what might be a solution?

isaacsanders commented 8 years ago

It should be "/auth/callback", iirc

On Mar 24, 2016, at 7:34 AM, Darragh Monaghan notifications@github.com wrote:

Similar to this theme, has anybody ever encountered problems with the response part of the OAuth cycle?

At present, users can sign in to the their Stripe account via OAuth, but on the redirect, they following error renders:

"No route matches [GET] "/oauth/callback" "

Does anyone have any experience with this, or ideas as to what might be a solution?

— You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub