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
Hello! I was wondering how to add middleware under the new V4 paradigm. Specifically, I'm trying to migrate a Ruby on Rails application that uses the omniauth-auth0 gem. V4 lamby worked great to get up and running but I am hitting a wall now with auth and I believe it is because I need to add the middleware to the handler.
Any tips or documentation for adding middleware in V4? Thank you.
The text was updated successfully, but these errors were encountered:
Interesting. There are some advanced configs I called out needing documentation in the #138 issue. Normally Rails has lots of middlewares. None of these require the handler to have any knowledge since they all work with Rack (your Rails app) simply by running the application. For example, ActiveRecord's database/shard middlewares. They get wrapped up as part of the application booting via all your standard configurations, gems, etc. I'd be surprised that Omniauth Auth0 was not the same.
That said, there is a configuration to customize the Rack application that the (also configurable) handler sends events to. You can see the default here. https://github.com/customink/lamby/blob/master/lib/lamby/config.rb#L34-L36. I think one valid use case would be doing thing you might normally do in a config.ru file. So to configure the "rack_app" you could add a config/initializers/lamby.rb file with something like this:
Thanks @metaskills for the quick response. This has helped me rule out any weirdness with the handler. I have some new clues to go on and will keep looking. Thank you!
Hello! I was wondering how to add middleware under the new V4 paradigm. Specifically, I'm trying to migrate a Ruby on Rails application that uses the
omniauth-auth0
gem. V4 lamby worked great to get up and running but I am hitting a wall now with auth and I believe it is because I need to add the middleware to the handler.Any tips or documentation for adding middleware in V4? Thank you.
The text was updated successfully, but these errors were encountered: