07-19-2017 04:30 AM
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.
07-19-2017 06:18 AM
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.
07-19-2017 07:02 AM
The error is displayed when trying to login from mobile app whereas it works fine when logging in from web application
07-19-2017 07:57 AM
Hey kay_kay, could you please contact Duo support with that info? Please also include the original info from your first post.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide