Debug auth flow

This commit is contained in:
Jakub Nowak 2025-02-09 20:45:04 +08:00
parent 2e38ecd15b
commit 973cf5725c

View file

@ -1,5 +1,6 @@
function authenticate(){
const selectedUser = users[currentUser].id;
console.log(selectedUser);
lightdm.cancel_authentication();
lightdm.authenticate(selectedUser);
@ -7,13 +8,16 @@ function authenticate(){
async function authenticationComplete() {
const selectedSession = sessions[currentSession].id;
console.log(selectedSession);
await lightdm.respond($("#password-input").value);
console.log("Response positive");
lightdm.start_session(selectedSession);
}
function bindAuthenticate() {
$("#password-input").onkeypress = function(e) {
console.log("Submitting");
var keycode = e.code || e.key;
if(keycode == "Enter"){
authenticate();