diff --git a/src/Aydsko.iRacingData/DataClient.cs b/src/Aydsko.iRacingData/DataClient.cs index 6aef82e..475aad5 100644 --- a/src/Aydsko.iRacingData/DataClient.cs +++ b/src/Aydsko.iRacingData/DataClient.cs @@ -2007,7 +2007,7 @@ private async Task LoginInternalAsync(CancellationToken cancellationToken) if (loginResult is null || !loginResult.Success) { var message = loginResult?.Message ?? $"Login failed with HTTP response \"{loginResponse.StatusCode} {loginResponse.ReasonPhrase}\""; - throw iRacingLoginFailedException.Create(message, loginResult?.VerificationRequired); + throw iRacingLoginFailedException.Create(message, loginResult?.VerificationRequired, string.Equals(loginResult?.Message, "Legacy authorization refused.", StringComparison.OrdinalIgnoreCase)); } IsLoggedIn = true; diff --git a/src/Aydsko.iRacingData/Package Release Notes.txt b/src/Aydsko.iRacingData/Package Release Notes.txt index f137b45..332ae8c 100644 --- a/src/Aydsko.iRacingData/Package Release Notes.txt +++ b/src/Aydsko.iRacingData/Package Release Notes.txt @@ -1,5 +1,7 @@ +BREAKING CHANGES: + +iRacing has enabled two-factor authentication by default. To continue to use this library you **must** [enable "Legacy Authentication" in your iRacing account settings](https://support.iracing.com/support/solutions/articles/31000173894-enabling-or-disabling-legacy-read-only-authentication) before attempting to authenticate. Please **do not** enable this setting unless you require it, as it may reduce the security on your iRacing account. + Fixes / Changes: -- DriverResult is missing the CountryCode property (Issue #228) - Included the "CountryCode" property in the "DriverResult" and "Result" classes. - Thanks to Duncan Watts (https://github.com/DuncWatts) for lodging the issue. +- Correctly handle the "Legacy authorization refused." login error message.