Login from iPhones sometimes fails

The issue is about logging in from our application.
Signing up and logging in from a PC is successful, but sometimes fails when run from an iPhone.
It does not always fail, but once it does, the login will not work for about 30 minutes. However, if you use another device (iPhone), you may be able to log in.
If you check the log, you will see “Invalid authorization code” after successful login. The browser shows “Unable to complete authentication: Code exchange was unsuccessful; network error resulted in unfulfilled request”.
It is unlikely that the Client ID and Client Secret are incorrect, since the login and sign-up are successful on the PC.
Do you know the cause of this problem?