cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2503
Views
0
Helpful
3
Replies

Error while displaying Duo iframe in Android

kay_kay
Level 1
Level 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.

3 Replies 3

mkorovesisduo
Level 4
Level 4

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.

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

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

Quick Links