我们创建了 Google Home Action,它在 Alpha 中完美运行。它通过了所有测试并且 oauth 有效。
但是,当我们尝试发布到生产环境时,过去 4 次都被拒绝,因为“oAuth 页面为空白”。
我现在已经将oAuth屏幕简化为最简单的html,没有javascript,有限的css,但我们仍然被拒绝。
Google Home Actions 团队缺乏共享任何日志或错误的能力,我们在检查服务器日志时找不到任何问题。谁能建议任何调试此问题的方法吗?
这是oauth页面的html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Link COMPANY NAME to Google</title>
<style>
body {
padding: 40px;
margin: auto;
font-family: Arial;
text-align: start;
}
.header {
padding: 8px;
text-align: center;
}
/* .contentHeader {
text-align: center;
} */
.instructions {
text-align: center;
margin: auto;
align-items: start;
}
.text_form {
text-align: center;
margin: auto;
align-items: start;
}
.submit {
background-color: rgb(0, 51, 255);
padding: 12px 24px;
margin: 4px;
border: none;
color: white;
font-weight: bold;
}
</style>
</head>
<body>
<div class="header">
<div class="brandingLogo"><img src="/COMPANY-logo.png" /></div>
</div>
<div class="content">
<div class="instructions">
<p>By entering the pin, you are authorizing Google to control your devices.</p>
</div>
<div class="text_form">
<form action="/oauth" method="post">
<label for="text">Enter pin:</label>
<input type="text" id="text" name="text">
<input type="hidden" name="redirect_uri" value="${url}">
<input type="hidden" name="state" value="${state}">
<br></br>
<input type="submit" class="submit" value="Agree and link">
</form>
</div>
</body>
</html>
我们的快速 CORS 设置如下:
app.use(cors({
origin: '*'
}));
有人可以帮忙吗?