`env['omniauth.auth']` is nil when customizing `callback_path`
Author: mhutterCreated Sep 8, 2014Updated Nov 6, 2025
I have a Rails app that "lives" in a subdirectory. To make sure the user gets to my app after authentication, I've added the following to my config/initializers/omniauth.rb:
callback_path: Rails.application.secrets.path+'/auth/ldap/callback'which works fine so far. However, now in my callback controller, env['omniauth.auth'] is always nil
Any Ideas to why this is happening?
I have an almost identical setup in another App (that's served from a Root directory) which works just fine.
Source: omniauth/omniauth