英文:
Google Home oAuth page blank in Beta/Production but works fine in Alpha
问题
我们已经创建了一个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>将公司名称链接到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>通过输入PIN码,您授权Google控制您的设备。</p>
</div>
<div class="text_form">
<form action="/oauth" method="post">
<label for="text">输入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="同意并链接">
</form>
</div>
</body>
</html>
我们的Express CORS设置如下:
app.use(cors({
origin: '*'
}));
有人可以提供帮助吗?
英文:
We have created a Google Home Action and it works perfectly in Alpha. It passes all the tests and the oauth works.
However when we try and release to production the have been rejected the past 4 times because the "oAuth page is blank".
I've now reduced the oAuth screen to the most simple html, no javascript, limited css, and we have still been rejected.
The Google Home Actions team lack the ability to share any logs or errors and we cannot find any issues when checking the server logs. Can anyone suggest any way of debugging this issue?
Here is the html of the oauth page:
<!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>
Our express CORS settings are as follows:
app.use(cors({
origin: '*'
}));
Can anyone help?
答案1
得分: 0
你可以尝试使用洗衣机Codelab,并参考那里的OAuth实现,根据你的需求进行实现。
你还可以使用NodeJS实现的OAuth。
英文:
答案2
得分: 0
几周的延迟后,我们的行动没有任何变化地发布了。我真的认为这是一个内部流程失误。
英文:
After a few weeks of delay our Action was published without any changes. I honestly think there was an internal process failure.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论