javascript - Duo security: how to pass arguments through post_argument on Duo.init() in two factor authentication

930

I am using Duo Security for implementing two factor authentication on my site. The problem is i need to pass some arguments with values. Somebody said, this can be done through to use post_argument(The argument for signed response in post_action). But how?
Any thing for you reference https://www.duosecurity.com/docs/duoweb

<script>
    Duo.init({
        'host': <?php echo "'" . HOST . "'"; ?>,
        'post_action':'index.php',
        'sig_request':<?php echo "'" . $sig_request . "'"; ?>
        'post_argument': ? *what will be here* ?
    });
</script>    

Thanks in advance.

963

Answer

Solution:

Notes on this are within the WebSDK docs here: https://www.duosecurity.com/docs/duoweb#passing-additional-post-arguments-with-the-signed-response

Duo’s JavaScript will pass additional arguments found in a duo_form form with the signed response. For example:

<form method="POST" id="duo_form">
<input type="hidden" name="next" value="next" />
</form>

People are also looking for solutions to the problem: php - Debugging a SOAP service using xDebug

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.