osu/osu.Game
Bartłomiej Dach 000ddc14ac
Fix broken locking in OAuth
Closes https://github.com/ppy/osu/issues/26824... I think?

Can be reproduced via something like

diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs
index 485274f349..e6e93ab4c7 100644
--- a/osu.Game/Online/API/OAuth.cs
+++ b/osu.Game/Online/API/OAuth.cs
@@ -151,6 +151,11 @@ internal string RequestAccessToken()
         {
             if (!ensureAccessToken()) return null;

+            for (int i = 0; i < 10000; ++i)
+            {
+                _ = Token.Value.AccessToken;
+            }
+
             return Token.Value.AccessToken;
         }

The cause is `SecondFactorAuthForm` calling `Logout()`, which calls
`OAuth.Clear()`, _while_ the `APIAccess` connect loop is checking if
`authentication.HasValidAccessToken` is true, which happens to
internally check `Token.Value.AccessToken`, which the clearing of
tokens can brutally interrupt.
2024-01-30 21:05:23 +01:00
..
Audio
Beatmaps Merge branch 'master' into dont-round-sv 2024-01-26 19:16:58 +09:00
Collections Fix collection dropdown crashing when all collections are deleted at once 2024-01-15 17:10:30 +09:00
Configuration Keep replay controls expanded by default 2024-01-18 20:13:32 +09:00
Database Do not reprocess ranks for custom rulesets 2024-01-23 12:59:36 +01:00
Extensions Fix date failing to display on leaderboard for some scores with weird datetimes 2024-01-14 13:52:39 +01:00
Graphics Merge pull request #26703 from peppy/smaller-slider-misses 2024-01-29 13:51:07 +01:00
Input Add bindings for stepping backward/forward 2024-01-18 20:38:25 +09:00
IO Add retry loop to avoid log export failing occasionally on windows 2024-01-25 13:53:36 +09:00
IPC
Localisation Merge pull request #26591 from peppy/offset-awareness 2024-01-22 14:59:31 +01:00
Models Use native query to avoid huge overheads when cleaning up realm files 2024-01-09 15:37:29 +09:00
Online Fix broken locking in OAuth 2024-01-30 21:05:23 +01:00
Overlays Add loading layer when requesting a code reissue 2024-01-29 17:54:34 +09:00
Performance
Properties
Replays
Rulesets Reduce overhead in ScrollingHitObjectContainer 2024-01-30 00:59:31 +03:00
Scoring Make LegacyScoreDecoder.PopulateMaximumStatistics() public 2024-01-29 21:42:38 +01:00
Screens Apply alternative solution 2024-01-29 20:07:27 +01:00
Skinning Revert "Remove dead code" (mostly) 2024-01-29 19:43:40 +09:00
Storyboards Fix storyboard animations stripping path directory on skin lookup 2024-01-17 18:39:48 +03:00
Tests Merge branch 'master' into 2fa 2024-01-29 16:57:29 +09:00
Updater
Users Fix one more incorrect bindable flow and simplify string setters 2024-01-17 17:00:56 +09:00
Utils Add retry loop to avoid log export failing occasionally on windows 2024-01-25 13:53:36 +09:00
.editorconfig
FodyWeavers.xml
osu!.res
osu.Game.csproj Update framework 2024-01-30 01:06:32 +09:00
OsuGame.cs Allow debug instances to coexist alongside release instances 2024-01-21 10:56:55 +09:00
OsuGameBase_Importing.cs
OsuGameBase.cs Update endpoints to final production endpoints 2024-01-30 18:40:17 +09:00
PerformFromMenuRunner.cs