mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:47:20 +08:00
Merge pull request #1451 from peppy/fix-endless-auth-loop
Fix a possible horrendous endless auth loop
This commit is contained in:
commit
7fa3ac8cf2
@ -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…
x
Reference in New Issue
Block a user