Description
Support multiple OIDC user agent response formats
Problem
For certain configurations of OIDC identity providers, the user info is not returned as JSON, but rather as a JWT (either signed or encrypted/nested). This is allowed by the spec.
FusionAuth only supports the plain JSON response (as documented here: FusionAuth/fusionauth-site#454 ) but it would be great to support other formats when the configuration of the remote identity provider can't be modified.
Solution
FusionAuth should support all the methods that an OIDC userinfo
response could be returned in. From the spec
Upon receipt of the UserInfo Request, the UserInfo Endpoint MUST return the JSON Serialization of the UserInfo Response as in Section 13.3 in the HTTP response body unless a different format was specified during Registration [OpenID.Registration]. The UserInfo Endpoint MUST return a content-type header to indicate which format is being returned. The content-type of the HTTP response MUST be application/json if the response body is a text JSON object; the response body SHOULD be encoded using UTF-8.
If the UserInfo Response is signed and/or encrypted, then the Claims are returned in a JWT and the content-type MUST be application/jwt. The response MAY be encrypted without also being signed. If both signing and encryption are requested, the response MUST be signed then encrypted, with the result being a Nested JWT, as defined in [JWT].
Alternatives/workarounds
Ask the OIDC endpoint admin to send back plain JSON. Use SAML instead to integrate with the IdP.
Additional context
Here's a forum post about this issue: https://fusionauth.io/community/forum/topic/834/getting-error-with-oidc-identity-provider
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.