Closed syakovyn closed 1 year ago
I like it :) Though, I suppose you will need to add a test to get the PR merged by maintainers.
Cool. Added a test case for this 💁♂️
I apologies, I didn't spotted initially that it completely removes checking the state when verify_state
is false
. I'd leave an error when the stored state doesn't match the passed one. Just ignore a case when when the state is neither passed nor stored. I've made a comment to the pull request: https://github.com/omniauth/omniauth_openid_connect/pull/127/files#r1006801215
Closing since #127 has been merged.
https://github.com/omniauth/omniauth_openid_connect/pull/181 revives the issue in a slightly different form. See https://github.com/omniauth/omniauth_openid_connect/issues/174#issuecomment-2197421935
According to https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.1
state
is recommended and is not required:The current implementation makes
state
required which, in turn, makes IdP initiated SSO impossible (or complicated with unnecessary redirections to getstate
parameter).Does it make sense to add an option to relax check for
state
? Something like changingOmniAuth::Strategies::OpenIDConnect#callback_phase
:Where
state_required
defaults totrue
to be backward compatible but allows relaxing thestate
check to except missingstate
when there is nostate
stored on SP side (IdP initiated SSO).