I'm trying to use the Duo Auth in my application, but after input the passcode or the push notification, nothing happens. I think the Duo would post to the login page or return some response, but i don't know how to automatically post or get the response in the JS.
I'm using the https://github.com/duosecurity/duo_php/tree/master/demos/simple example, the full code can be found in the link.
There are some functions in the JS, including this one, but i can't reach it with the "response" event
function doPostBack(response) {
// create a hidden input to contain the response token
var input = document.createElement('input');
input.type = 'hidden';
input.name = postArgument;
input.value = response + ':' + appSig;
// user may supply their own form with additional inputs
var form = document.getElementById('duo_form');
// if the form doesn't exist, create one
if (!form) {
form = document.createElement('form');
// insert the new form after the iframe
iframe.parentElement.insertBefore(form, iframe.nextSibling);
}
// make sure we are actually posting to the right place
form.method = 'POST';
form.action = postAction;
// add the response token input to the form
form.appendChild(input);
// away we go!
if (typeof submitCallback === "function") {
submitCallback.call(null, form);
} else {
form.submit();
}
}