mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fix a possible horrendous endless auth loop
This commit is contained in:
@ -118,6 +118,7 @@ namespace osu.Game.Online.API
|
|||||||
//NotificationOverlay.ShowMessage("Login failed!");
|
//NotificationOverlay.ShowMessage("Login failed!");
|
||||||
log.Add(@"Login failed!");
|
log.Add(@"Login failed!");
|
||||||
Password = null;
|
Password = null;
|
||||||
|
authentication.Clear();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
internal bool AuthenticateWithLogin(string username, string password)
|
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)
|
using (var req = new AccessTokenRequestPassword(username, password)
|
||||||
{
|
{
|
||||||
Url = $@"{endpoint}/oauth/token",
|
Url = $@"{endpoint}/oauth/token",
|
||||||
|
Reference in New Issue
Block a user