working on server authenticate users
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user