You may see the following “invalid_client” error when attempting to exchange an authorization code as part of the OpenID Connect workflow: Ensure that your service is configured to encode the authorization header using base64 format, as this is a requirement of the token endpoint.
https://dev.epicgames.com/community/learning/knowledge-base/Jd2db/epic-online-services-when-integrating-openid-connect-with-epic-account-services-what-can-cause-the-invalid_client-error-when-exchanging-the-authorization-code