added token based registration.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-01-12 18:37:51 -07:00
parent bb4a8f7f83
commit 8815009b04
20 changed files with 581 additions and 125 deletions

View File

@@ -10,6 +10,19 @@
}
})
}
function performRegistration() {
var token = $("#inputToken").val();
var userName = $("#inputUserName").val();
var userPassword = $("#inputUserPassword").val();
$.post('/Login/Register', { userName: userName, password: userPassword, token: token }, function (data) {
if (data.success) {
successToast(data.message);
setTimeout(function () { window.location.href = '/Login/Index' }, 500);
} else {
errorToast(data.message);
}
});
}
function handlePasswordKeyPress(event) {
if (event.keyCode == 13) {
performLogin();