Closed ghost closed 6 months ago
@chadsterBAM hmm, I can't find that as a valid implementation of OIDC. We do have an issue open already because expires_in
is actually an optional item.
{"id_token":"","token_type":"Bearer","not_before":1714407443,"id_token_expires_in":3600,"profile_info":"","scope":"openid"}
This is what comes back from B2C. I haven't altered the output of it at all except to obfuscate the id_token and profile_info.
OK, so the real fix on my side is to ensure that the expires_in
is truly optional, but then also ensuring that according to spec:
As specified in OAuth 2.0 [RFC6749], Clients SHOULD ignore unrecognized response parameters.
https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse
I won't be changing the code to accommodate the invalid attribute that is being sent that is on the side of the IDP as they have incorrectly implemented the OIDC specs.
IDPs should use expires_in
but that should also be optional. https://github.com/oidc-wp/openid-connect-generic/issues/439
Undefined array key "expires_in" in /var/www/wordpress/wp-content/plugins/daggerhart-openid-connect-generic/includes/openid-connect-generic-client-wrapper.php on line 742
The cookie refresh token needs to be changed to :
From :
My IDP sends back a token with 'id_token_expires_in' not 'expires_in'.
Could this be an option or just search for '*expires_in' as a key?
Expected behavior User is never logged in because the cookie timeout doesn't get a value.
Isolating the problem (mark completed items with an [x]):
WordPress Environment