Implemented Discord OAuth2 authentication flow with a new Discord.cs handler and integrated it into Program.cs. Refactored authentication logic to use shared JsonSerializerOptions from LauncherConstants. Updated BashUtils with cross-platform URL opening, improved MojangAPI to use shared HttpClient, and enhanced frontend login and log handling in logged.js and login.js.
16 lines
596 B
C#
16 lines
596 B
C#
using System.Net.Http;
|
|
using System.Text.Json;
|
|
|
|
namespace Lentia.Core.Constants
|
|
{
|
|
public static class LauncherConstants
|
|
{
|
|
public static readonly HttpClient Http = new HttpClient();
|
|
public static readonly JsonSerializerOptions _jsonOptions = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
|
|
public static class Urls
|
|
{
|
|
public const string MojangManifest = "https://launchermeta.mojang.com/mc/game/version_manifest_v2.json";
|
|
public const string MojangAuthServer = "https://yggdrasil.azures.fr/authserver";
|
|
}
|
|
}
|
|
} |