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

2k views Asked by At

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.

1

There are 1 answers

0
Patrick On

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>