mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
[SKIP_DEPLOY] Support account alias in configs
This commit is contained in:
parent
c0266685a8
commit
0b5a562f7f
17 changed files with 213 additions and 157 deletions
|
|
@ -570,11 +570,12 @@ namespace MinecraftClient.Protocol
|
|||
Microsoft.OpenBrowser(Microsoft.SignInUrl);
|
||||
else
|
||||
Microsoft.OpenBrowser(Microsoft.GetSignInUrlWithHint(loginHint));
|
||||
ConsoleIO.WriteLine("Your browser should open automatically. If not, open the link below in your browser.");
|
||||
ConsoleIO.WriteLine(Translations.mcc_browser_open);
|
||||
ConsoleIO.WriteLine("\n" + Microsoft.SignInUrl + "\n");
|
||||
|
||||
ConsoleIO.WriteLine("Paste your code here");
|
||||
ConsoleIO.WriteLine(Translations.mcc_browser_login_code);
|
||||
string code = ConsoleIO.ReadLine();
|
||||
ConsoleIO.WriteLine(string.Format(Translations.mcc_connecting, "Microsoft"));
|
||||
|
||||
var msaResponse = Microsoft.RequestAccessToken(code);
|
||||
return MicrosoftLogin(msaResponse, out session);
|
||||
|
|
@ -604,7 +605,7 @@ namespace MinecraftClient.Protocol
|
|||
session.PlayerID = profile.UUID;
|
||||
session.ID = accessToken;
|
||||
session.RefreshToken = msaResponse.RefreshToken;
|
||||
InternalConfig.Login = msaResponse.Email;
|
||||
InternalConfig.Account.Login = msaResponse.Email;
|
||||
return LoginResult.Success;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue