Replies: 1 comment 3 replies
-
One followup note — #747 made me think of a way to cleanly handle this with session state such that I could control the race conditions a bit better, and I think I'm good to go now. I'd love to know whether there is any way to pass custom state through the Passport |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to pass custom state with the Passport strategy's
authenticate
call such that, once the OIDC provider passes the browser back to the application after successful authentication, that custom state is returned to the application as well?I have an application that has to force-auth users at the point of them applying a digital signature to an object, so at that point, I have to pop up a window which redirects them through a forced-login flow (using the prompt=login request parameter). On returning from that login, I need to then be able to finish the digital signature process, so they need to be redirected back to the right endpoint in my app to do that. My ideal would be to be able to have the initial redirection to our OIDC provider include the extra state of where they should be redirected upon successful authentication, state that then gets passed back to the app after that authentication succeeds.
(Note that I've experimented with using server-side session to do this, but this is fraught with the session then meaning that if they have another app window open, that window too ends up also being affected by the session change. And even then, I've run into painful race states when/if there is an issue saving the session before the redirection completes, then they get stuck in an auth loop.)
Beta Was this translation helpful? Give feedback.
All reactions