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
OIDC Authorization Code Flow callback handling appears to require fragment response mode
Summary
While integrating CIBseven WebClient with an external OpenID Connect provider using Authorization Code Flow, we observed that the SSO callback logic appears to only process authorization responses received via URL fragments (location.hash).
This causes interoperability issues with providers that do not support authorization code responses in fragment mode
Observed Behavior
The WebClient initiates authentication with:
response_type=code
response_mode=fragment
However, some OIDC providers may not honor the requested fragment response mode for auth code flow and return the authorization response as:
/webapp/sso-login.html?code=<code>&state=<state>
rather than:
/webapp/sso-login.html#code=<code>&state=<state>
When this occurs, the callback page enters a login loop and initiates a new authorization request instead of processing the received authorization code.
Investigation
The callback handler appears to read authorization parameters exclusively from:
which assumes the authorization response will always be returned in the URL fragment.
Why this is problematic
Authorization Code Flow integrations may encounter providers that return the authorization response via query parameters, regardless of the requested response mode.
In such scenarios, authentication is successful at the identity provider, but the WebClient is unable to process the callback and enters a redirect loop.
This makes interoperability dependent on provider-specific response mode behavior rather than on the presence of a valid authorization code and state.
Expected Behavior
The callback handler should support both:
/webapp/sso-login.html?code=...&state=...
and
/webapp/sso-login.html#code=...&state=...
when processing Authorization Code Flow callbacks.
For example, the callback parser could fall back to location.search when no fragment parameters are present.
Alternatively, the expected callback response mode could be made configurable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
OIDC Authorization Code Flow callback handling appears to require fragment response mode
Summary
While integrating CIBseven WebClient with an external OpenID Connect provider using Authorization Code Flow, we observed that the SSO callback logic appears to only process authorization responses received via URL fragments (
location.hash).This causes interoperability issues with providers that do not support authorization code responses in fragment mode
Observed Behavior
The WebClient initiates authentication with:
However, some OIDC providers may not honor the requested fragment response mode for auth code flow and return the authorization response as:
rather than:
When this occurs, the callback page enters a login loop and initiates a new authorization request instead of processing the received authorization code.
Investigation
The callback handler appears to read authorization parameters exclusively from:
and does not fall back to:
As a result:
causes state validation to fail and a new login request to be triggered.
The relevant code appears to be:
which assumes the authorization response will always be returned in the URL fragment.
Why this is problematic
Authorization Code Flow integrations may encounter providers that return the authorization response via query parameters, regardless of the requested response mode.
In such scenarios, authentication is successful at the identity provider, but the WebClient is unable to process the callback and enters a redirect loop.
This makes interoperability dependent on provider-specific response mode behavior rather than on the presence of a valid authorization code and state.
Expected Behavior
The callback handler should support both:
and
when processing Authorization Code Flow callbacks.
For example, the callback parser could fall back to
location.searchwhen no fragment parameters are present.Alternatively, the expected callback response mode could be made configurable.
All reactions