swift
swift copied to clipboard
Avoid reattempting authentication for auth versions where it has no effect
There are circumstances where the automatic authentication retry causes confusion and unexpected behaviour.
For example when the password is entered by a human and mistyped. If the underlying authentication system causes the user to be blocked after X attempts this will happen sooner than expected (after X/2 attempts).
This PR limits the retry to only happen for versions where it may have any actual positive effect (v2).