1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:13:20 +08:00

Fix a possible horrendous endless auth loop

This commit is contained in:
Dean Herbert 2017-11-02 19:41:11 +09:00
parent 718f11f26e
commit b0785b2f09
2 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,7 @@ namespace osu.Game.Online.API
//NotificationOverlay.ShowMessage("Login failed!");
log.Add(@"Login failed!");
Password = null;
authentication.Clear();
continue;
}

View File

@ -27,6 +27,9 @@ namespace osu.Game.Online.API
internal bool AuthenticateWithLogin(string username, string password)
{
if (string.IsNullOrEmpty(username)) return false;
if (string.IsNullOrEmpty(password)) return false;
using (var req = new AccessTokenRequestPassword(username, password)
{
Url = $@"{endpoint}/oauth/token",