Update To new godot system, Migrate the login system to auth.mistox.com
This commit is contained in:
@@ -15,11 +15,12 @@ public partial class SessionHandler : Panel {
|
||||
}
|
||||
|
||||
public async void onLogin() {
|
||||
(bool, Account) User = await _Reference.MistoxNet.TryLogin( UsernameBox.Text, PasswordBox.Text );
|
||||
if( User.Item1 ) {
|
||||
|
||||
(bool, string) tSessionToken = await _Reference.MistoxNet.TryGetSessionToken( UsernameBox.Text, PasswordBox.Text );
|
||||
if( tSessionToken.Item1 ) {
|
||||
_Reference.Alert.PerformAlert( "Login Success" );
|
||||
_Options._SettingsFile.Game.UserName = User.Item2.UserName;
|
||||
_Options._SettingsFile.Game.SessionToken = User.Item2.PasswordHash;
|
||||
_Options._SettingsFile.Game.UserName = UsernameBox.Text;
|
||||
_Options._SettingsFile.Game.SessionToken = tSessionToken.Item2;
|
||||
_Options._SettingsFile.Save();
|
||||
GetParent<Control>().Visible = false;
|
||||
} else {
|
||||
@@ -28,6 +29,6 @@ public partial class SessionHandler : Panel {
|
||||
}
|
||||
|
||||
public void onRegister() {
|
||||
OS.ShellOpen("https://www.mistox.net/account/register");
|
||||
OS.ShellOpen("https://auth.mistox.com/account/register");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user