Open leesmith opened 2 months ago
More logging info:
Rails.logger.info("::::::::::: RACK SESSION") { @env["rack.session"].inspect }
produces:
INFO -- ::::::::::: RACK SESSION: [0e97bc23-110b-48c5-8049-6591c7727feb] #<ActionDispatch::Request::Session:0x14938 not yet loaded>
I've got a rails 6 app using the latest versions of devise and omniauth-saml. The app allows any number of identity providers (IDP) to communicate with so to do that I've essentially followed this blog post that outlines how to customize the setup phase to plugin the correct IDP at runtime.
This app is not using subdomains so the main difference in my implementation is that I set the id of the IDP on the session before the app calls out to the IDP (users submit their email address and the domain gets extracted for the IDP lookup). Once the SAML assertion comes back, it grabs that IDP id out of the session in the setup phase to continue on.
The following is the rack middleware that's used in the setup phase that works in rails 6 but not in rails 7 (the line where it accesses the session). Any idea why? I even tried downgrading Rack to 2.2.9 in the rails 7 app and it still didn't work...
idp_id
is always justnil
. Or is there a better way to do this? Thanks for any help!