Error while displaying Duo iframe in Android


#1

I am trying to load duo iframe into my Android Webview. The below code is my Android code to set the WebView.

        duo.getSettings().setJavaScriptEnabled(true);
        duo.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        duo.getSettings().setAllowFileAccessFromFileURLs(true);
        duo.getSettings().setAllowUniversalAccessFromFileURLs(true);
        duo.loadDataWithBaseURL("file:///android_asset/",makeHTML(), "text/html", "UTF-8", null);

The below code is loaded into the WebView.

   <html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
    <form id="■■■■■■■■■■■■■■■■■■■■" method="post" action="" ></form>
    	<div id="DUO_Enrollment_frame" >
    	<script type="text/JavaScript" src="Duo-Web-v2.min.js"></script>
    	<iframe align="middle" data-host="..." data-sig-request="..." id="duo_iframe" width="100%" height="420" frameborder="0" application="yes">
    	</iframe>
    <form method="POST" id="duo_form" name="duo_form"></form>
    </div>
</body>

When the page loads in the WebView I get “Access denied. The server’s time may be out of sync” error.


#2

Hi kay_kay, this error often occurs if the time on the host is out of sync. To resolve it, sync the host’s server time to an NTP server.

I’d also recommend that you double-check that the proper values (ikey, skey, akey, username) are being passed to sign_request().

This info was taken from a Knowledge Base article you can read here.


#3

The error is displayed when trying to login from mobile app whereas it works fine when logging in from web application


#4

Hey kay_kay, could you please contact Duo support with that info? Please also include the original info from your first post.