我有这个简单的谷歌+登录页面。当我从android chrome浏览器登录时,一切正常,但是当我在登录后尝试从Android专属门户登录时,我在专属门户上只看到一个空白页面,并且onSignIn函数没有执行。
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="xxx.apps.googleusercontent.com">
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
alert('Name: ' + profile.getName());
alert('Email: ' + profile.getEmail());
document.getElementById("login").click();
}
</script>
</head>
<body>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
<form name="loginform" action="http://10.10.10.1/login" method="post">
<input type="hidden" name="username" value="testwifi">
<input type="hidden" name="password" value="teswifi">
<input type="submit" name="login" value="log in" id="login" style="visibility:hidden;">
</form>
</body>
发布于 2017-07-12 22:28:52
我已经调试了android,当强制加载时,它似乎在这一个上失败了:
信息:控制台(20)“未捕获错误: sessionStorage在当前环境中不可用。”,来源:https://ssl.gstatic.com/accounts/o/1096633630-storagerelay.js (20)
https://stackoverflow.com/questions/33169730
复制相似问题