OAuth SSO Config Error Problem

I configured OAuth2 for SSO login in version 8.3.1. In the browser's developer console, I observed the correct API calls and redirections, but the final response returned "Undefined." Additionally, on the last step of the test login, the response shown in the developer console says "Javascript is required." At this point, I checked the Ignition gateway logs and found the following error:

com.inductiveautomation.ignition.gateway.auth.idp.IdentityProviderException: Unable to exchange the auth code for the token

Has anyone encountered a similar issue before? Could you please help me look into this?

Un defined

I noticed that after the redirect, the "code" parameter isn't being passed correctly. Is this a system issue or a configuration problem on my end?