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:
parent
718f11f26e
commit
b0785b2f09
@ -118,6 +118,7 @@ namespace osu.Game.Online.API
|
||||
//NotificationOverlay.ShowMessage("Login failed!");
|
||||
log.Add(@"Login failed!");
|
||||
Password = null;
|
||||
authentication.Clear();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user