-
Notifications
You must be signed in to change notification settings - Fork 75
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
Callback Route Not Matching #32
Comments
I'm having the same problem, I had to add the custom routes in the devise_scope as suggested by septerr |
Hey. I just found a bug in omniauth-oauth2 that might have been the cause of this bug. I am so sorry it has taken this long to get this resolved. I hope that a new version of omniauth-oauth2 will come out soon with my fix in it, then I will release another version of this gem, hopefully fixing all of your problems. Thank you for your patience. – Isaac |
FWIW I run into the same problem with |
Still occurring for me with omniauth-oauth2 1.5.0 & omniauth-stripe-connect 2.10.0. Adding the routes manually worked, of course. My devise route, for reference devise_for :users,
path_names: { sign_in: 'login', sign_out: 'logout' },
controllers: {
sessions: 'users/sessions',
confirmations: 'users/confirmations',
registrations: 'users/registrations',
omniauth_callbacks: 'users/omniauth_callbacks',
invitations: 'users/invitations'
} |
Not sure why this happens. But here is the scenario:
I have omniauth-stripe-connect as well as devise in my gemfile.
I have following in initializers/devise.rb:
config.omniauth :stripe_connect, ENV['STRIPE_CONNECT_CLIENT_ID'], ENV['STRIPE_SECRET']
My routes.rb:
My OmniauthCallbacksController:
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
When I do rake routes, I see the authorize and callback paths:
I have set the callback url in my Stripe account to:
http://localhost:3000/users/auth/stripe_connect/callback
When I go to /users/auth/stripe_connect in the browser, it redirects me to connect.stripe.com as expected and after I click on the blue button 'Connect My Stripe Account', the page then redirects to http://localhost:3000/users/auth/stripe_connect/callback. At this point I get a 404.
I dont understand why http://localhost:3000/users/auth/stripe_connect/callback does not match the user_omniauth_callback route.
This is what I see in the console:
I was able to get past the issue by manually adding the routes to route.rb:
Why did the callback route did not match until I added those routes manually?
The text was updated successfully, but these errors were encountered: