You can wrap the POST request as usual, then adjust the timeout accordingly. If the network is unstable, set timeout to 3 seconds (3000 in code) and set retry to 3-5 times. If login is successful, user will be redirected immediately. If it failed, throw notification that login failed due to network issue, and user can try to log in again.
Be warned that it has trade-off of higher traffic for server.
Find the best configuration between timeout and retries that suit your needs.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can wrap the POST request as usual, then adjust the timeout accordingly. If the network is unstable, set timeout to 3 seconds (3000 in code) and set retry to 3-5 times. If login is successful, user will be redirected immediately. If it failed, throw notification that login failed due to network issue, and user can try to log in again.
Be warned that it has trade-off of higher traffic for server.
Find the best configuration between timeout and retries that suit your needs.