Hi Enzo,
I am curious: can you spot any relevant differences between acceptance- and production environment-settings?
"Realm verification failed" is a message you can get when your SSO settings aren't as recommended, you can look at this part of the api documentation: https://docs.mendix.com/apidocs-mxsdk/apidocs/single-sign-on-api to see if that brings you closer to a solution ("realm verification failed' is covered here as well)