Skip to content

Commit 0047018

Browse files
Remove authentication from launcher (#195)
* Remove authentication from launcher * Remove FirebaseAuthentication NuGet package * Remove unused files and update changelog for 931 * Update README
1 parent 67a9eea commit 0047018

29 files changed

+29
-1250
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Flathub](https://img.shields.io/flathub/v/org.unitystation.StationHub?style=flat-square)](https://flathub.org/apps/details/org.unitystation.StationHub)
66
[![Discord](https://img.shields.io/discord/273774715741667329?style=flat-square)](https://discord.com/invite/tFcTpBp)
77

8-
This is the official launcher for Unitystation, it handles account creation, downloading, updating, and server joining.
8+
StationHub is the official launcher for Unitystation, it handles downloading, updating, and joining servers.
99

1010
## Tech-stack
1111
It is cross-platform using .NET 6 as the runtime and [Avalonia MVVM](https://docs.avaloniaui.net/guides/basics/mvvm) for the UI.
-1.98 KB
Binary file not shown.

UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<li>Adds links to the Unitystation Discord and GitHub issues pages.</li>
7575
<li>The auto update feature has been replaced with a notification.</li>
7676
<li>Adds a placeholder to the News panel, this will be replaced with posts from the Unitystation Blog in the future.</li>
77+
<li>Account creation, management, and login is now handled by the game instead of StationHub.</li>
7778
</ul>
7879
<p>Bug Fixes:</p>
7980
<ul>
-1.52 KB
Binary file not shown.
-7.88 KB
Binary file not shown.

UnitystationLauncher/Models/Api/Server.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace UnitystationLauncher.Models.Api
88
{
9+
[Serializable]
910
public class Server
1011
{
1112
public Server(string forkName, int buildVersion, string serverIp, int serverPort)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
using System;
12
using System.Collections.Generic;
23

34
namespace UnitystationLauncher.Models.Api
45
{
6+
[Serializable]
57
public class ServerList
68
{
7-
public List<Server> Servers { get; set; } = new List<Server>();
9+
public List<Server> Servers { get; set; } = new();
810
}
911
}

UnitystationLauncher/Models/Installation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public Installation(string folderPath)
5454
return exe;
5555
}
5656

57-
public void LaunchWithArgs(string ip, short port, string? refreshToken, string? uid)
57+
public void LaunchWithArgs(string ip, short port)
5858
{
59-
Start($"--server {ip} --port {port} --refreshtoken {refreshToken} --uid {uid}");
59+
Start($"--server {ip} --port {port}");
6060
}
6161

6262
public void LaunchWithoutArgs()

UnitystationLauncher/Services/AuthService.cs

Lines changed: 0 additions & 247 deletions
This file was deleted.

UnitystationLauncher/Services/ServerService.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Linq;
44
using System.Net.Http;
55
using System.Reactive.Linq;
6+
using System.Text.Json;
67
using System.Threading.Tasks;
7-
using Newtonsoft.Json;
88
using ReactiveUI;
99
using Serilog;
1010
using UnitystationLauncher.Constants;
@@ -41,7 +41,12 @@ private async Task<IReadOnlyList<Server>> GetServerListAsync()
4141
Refreshing = true;
4242

4343
string data = await _http.GetStringAsync(ApiUrls.ServerListUrl);
44-
List<Server>? serverData = JsonConvert.DeserializeObject<ServerList>(data)?.Servers;
44+
List<Server>? serverData = JsonSerializer.Deserialize<ServerList>(data, options: new()
45+
{
46+
IgnoreReadOnlyProperties = true,
47+
PropertyNameCaseInsensitive = true
48+
})?.Servers;
49+
4550
Log.Information("Server list fetched");
4651

4752
List<Server> servers = new();

0 commit comments

Comments
 (0)