mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Microsoft Sign-in: Migrate to our own client Id (#1827)
* Microsoft Sign-in: Migrate to our own client Id - Drop support of "mcc" sign-in method - Add nuget packages for decoding JWT * Remove JWT nuget package * Remove client secret It is not needed after changing application type in Azure * Change token validation method to expiration time * Revert changes of dropping mcc sign-in method * Add email pre-fill for browser sign-in
This commit is contained in:
parent
9a9245f193
commit
fdc3069083
6 changed files with 622 additions and 501 deletions
|
|
@ -143,10 +143,8 @@ namespace MinecraftClient
|
|||
|
||||
//Asking the user to type in missing data such as Username and Password
|
||||
bool useBrowser = Settings.AccountType == ProtocolHandler.AccountType.Microsoft && Settings.LoginMethod == "browser";
|
||||
if (Settings.Login == "")
|
||||
if (Settings.Login == "" && !useBrowser)
|
||||
{
|
||||
if (useBrowser)
|
||||
ConsoleIO.WriteLine("Press Enter to skip session cache checking and continue sign-in with browser");
|
||||
Console.Write(ConsoleIO.BasicIO ? Translations.Get("mcc.login_basic_io") + "\n" : Translations.Get("mcc.login"));
|
||||
Settings.Login = Console.ReadLine();
|
||||
}
|
||||
|
|
@ -213,7 +211,7 @@ namespace MinecraftClient
|
|||
if (result != ProtocolHandler.LoginResult.Success)
|
||||
{
|
||||
Translations.WriteLineFormatted("mcc.session_invalid");
|
||||
if (Settings.Password == "")
|
||||
if (Settings.Password == "" && Settings.AccountType == ProtocolHandler.AccountType.Mojang)
|
||||
RequestPassword();
|
||||
}
|
||||
else ConsoleIO.WriteLineFormatted(Translations.Get("mcc.session_valid", session.PlayerName));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue