-
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
Unable to override OmniauthCallbacksController#redirect_callbacks #186
Comments
I think we're succeeding in doing what you're talking about like this in routes.rb:
That helpful? |
@nbrustein That doesn't override the |
@nbrustein @frankjwu Right. FWIW, I haven't encountered any issues since implementing the fix I described above. |
@frankjwu I just noticed that we also have this in our routes. So I guess this is why it's working for us:
I thought that was just ensuring that we handle posts appropriately (as opposed to gets) when using omniauth-saml, but maybe that's the reason it works at all. |
@tbloncar i think i'm having the same problem as you. i tried moving the route into lib/devise_token_auth/rails/routes.rb with no luck, however. does your current fork have this change implemented? |
@medaglia I don't have this change on my fork, but it looks like I just added the following beneath this line.
Is this—save the specific location on line 54—the same change that you implemented? |
thanks @tbloncar, that resolved my issue. |
Okay. Cool. Welcome. |
This seems like it should probably get merged into master, especially if you haven't seen any problems with it (@tbloncar). |
@tbloncar - if you have a PR for this already, I'll merge it! |
Fully support OmniauthCallbacksController action overrides. Fixes #186.
Is the fix from @tbloncar been merged ? @booleanbetrayal thanks. |
I noticed that my
OmniauthCallbacksController#redirect_callbacks
override implementation wasn't being used. I dug into this a bit, and it turns out that the override foromniauth_callbacks
will never touch this particular route, as it is defined in config/routes.rb (and not lib/devise_token_auth/rails/routes.rb).I was able to fix this by moving the route definition to the latter file (where the overrides are considered).
Does this present other issues? Or can we safely move this route definition and remove
config/routes.rb
?I can put a PR together with the update if we're okay with moving forward.
The text was updated successfully, but these errors were encountered: