working on server authenticate users

This commit is contained in:
2026-05-13 23:47:33 -04:00
parent a9d2fd64de
commit 63d3806936
11 changed files with 125 additions and 36 deletions

View File

@@ -8,10 +8,12 @@ namespace RelayClient;
public partial class MainPage : ContentPage
{
private readonly string _username;
public static string _username;
private readonly RelaySocketClient _socket;
private readonly RtcBridgeService _rtc;
public static string? _userToken;
private string? _currentChannelId;
private string? _currentChannelName;
@@ -23,6 +25,7 @@ public partial class MainPage : ContentPage
InitializeComponent();
_username = username;
UserLabel.Text = $"Logged in as: {_username}";
if (!KeyStorage.HasKeys(_username))
@@ -32,7 +35,7 @@ public partial class MainPage : ContentPage
KeyStorage.SavePublicKey(_username, keys.publicKey);
}
ServerAPI.setupClient();
var waitFor = ServerAPI.setupClient();
_socket = new RelaySocketClient(_username);
_rtc = new RtcBridgeService(
@@ -56,6 +59,8 @@ public partial class MainPage : ContentPage
});
};
// while(!waitFor.IsCompleted){}
_socket.Connect();
}