- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在为 google home 使用 google 上的操作构建一个智能家居应用程序。我们的应用程序需要登录我们的系统才能访问用户设备,以便他们可以通过 google home 使用语音控制他们。我们的用户后端是使用 AWS Cognito 构建的。我们使用 API.AI 作为 Google Home 应用的一部分。
我已经将 Cognito OAUTH2 端点和谷歌应用程序上的操作配置为使用身份验证代码流和不同的范围相互协作,但是我缺少一些东西。当我尝试将用户帐户链接到 Google Home 应用程序时,我被重定向到我们的登录页面。填写用户详细信息后,我返回到 Google Home 的“发现”选项卡,但底部有一条消息指出:“身份验证代码交换中的 IdP 响应错误”。
我也尝试过使用 Google 的 OAUTH2 游乐场。似乎在使用它时我可以从我们的 OATUH 服务器获取代码,但是在尝试将代码交换为 token 时,我收到以下错误:
HTTP/1.1 400 Bad Request
Strict-transport-security: max-age=31536000 ; includeSubDomains
X-content-type-options: nosniff
X-application-context: application:prod:8443
Transfer-encoding: chunked
Set-cookie: XSRF-TOKEN=35f58337-76f4-4993-a0c9-93429134ea42; Path=/; Secure; HttpOnly
Expires: 0
Server: Server
Connection: keep-alive
X-amz-request-id: 284d862e-b021-4079-b5f5-3cbce675983c
X-xss-protection: 1; mode=block
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
Date: Wed, 23 Aug 2017 13:51:42 GMT
X-frame-options: DENY
Content-type: application/json;charset=UTF-8
{
"error": "invalid_client"
}
最佳答案
好的,我可能知道原因.....如果您使用 aws cognito ...
根据此文档( http://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html )
授权
如果向客户端发布了 secret ,则客户端必须通过基本 HTTP 授权在授权 header 中传递其 client_id 和 client_secret。 secret 是基本 Base64Encode(client_id:client_secret)。
他们需要将客户端和客户端 sectet 放在标题中......
然后我使用 aws http proxy 捕获了 google progress 的请求。
Method request headers: {X-Cloud-Trace-Context=d7b6b9b8239965baf69acab659e80a01/13879251242019662389, CloudFront-Viewer-Country=US, CloudFront-Forwarded-Proto=https, CloudFront-Is-Tablet-Viewer=false, CloudFront-Is-Mobile-Viewer=false, User-Agent=google-oauth-playground AppEngine-Google; (+http://code.google.com/appengine; appid: s~oauth2playground), X-Forwarded-Proto=https, CloudFront-Is-SmartTV-Viewer=false, Host=en75z5h2rb.execute-api.us-east-1.amazonaws.com, Accept-Encoding=gzip, deflate, X-Forwarded-Port=443, X-Amzn-Trace-Id=Root=1-5a0fcef2-09197cd86a625ad47d78f0b7, Via=1.1 d63a8908759a2f4775b3f672ebf823cc.cloudfront.net (CloudFront), X-Amz-Cf-Id=nFdLK97vAS5HvmpNYkPpbUMOB4bCaM6pScHWTAReAnonLg1gXF7hSg==, X-Forwarded-For=107.178.195.199, 54.182.238.53, content-type=application/x-www-form-urlencoded, CloudFront-Is-Desktop-Viewer=true}
"error": "invalid_client"
Thanks for contacting AWS Support and providing us with detailed references. I would be happy to assist with your question regarding Cognito supporting client credentials in the request-body.
After reading through the OAUTH2.0 Standards RFC 6749 [0], It looks like including the client credentials in the request-body is not recommended. Here's an excerpt on the spec:
"Including the client credentials in the request-body using the two parameters is not recommended and should be limited to clients unable to directly utilize the HTTP Basic authentication scheme (or other password-based HTTP authentication schemes)."
关于oauth-2.0 - Google Home App,无法让 OAUTH 正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45841730/
当我使用 Html.ActionLink 时,我发现 @Html.ActionLink("Home", "Index", "home")生成此字符串 Home ,那么为什么地址是\home\index
我有一个现有的 webapi 2 应用程序需要添加基本的前端。现有的 webapi Controller 已在名为 xController yController 的 Controllers 目录根目
我家里有一个应用程序小部件,它会定期更新。如果 HOME 不可见,我想停止更新。我使用一项服务来注册屏幕开/关接收器,以便在屏幕开/关时开始/停止更新应用程序小部件。但我不知道如何检测屏幕是否打开但用
我在使用 create-react-app 时遇到了这个问题,我得到了一个错误: Home does not contain an export named Home. 下面是我如何设置我的 App.
最近我不得不在 .bashrc 中更新我的 JAVA 环境变量 echo $JAVA_HOME # prints out /usr/java/... echo $(JAVA_HOME) # raise
$ cat Makefile all: echo VAR is ${HOME} echo VAR is $${HOME} 给予 $ make echo VAR is /home/abc
我尝试在 google home 模拟器中测试我的项目。直到昨天它还在工作,但今天它显示错误“完成您的请求时出错”网址:“https://console.actions.google.com/proj
我已经实现了具有 OnOff 特性的风扇打开/关闭功能和具有 Fanspeed 特性的风扇模式(“高”、“中”、“低”),现在我想实现百分比 Controller 。例如:将风扇速度设置为 50%。我
我制作了一个小型 Google Home 应用程序,我的服务通过 SimpleMessage + Card 返回响应。 在 console.actions.google.com 模拟器中运行应用程序时
我还在用log4j-1.2.14.jar 在我尝试使用的属性中 log4j.appender.R=org.apache.log4j.DailyRollingFileAppender log4j.app
我正在使用 google smarthome actions for IOT...我更新了我的操作 URL 和帐户链接详细信息。当我尝试在模拟器中启用测试以将我的 TestAPP 部署到云时,它失败并
我在使用 Spring Boot 时遇到了一些问题。 当我使用 @RequestMapping(value = "/home") 时,一切正常。但是当我使用 @RequestMapping(name
起初,文件图标在我的 Ubuntu 20.04 中丢失。后来我运行 sudo root ,但是点击桌面上的图标打开文件还是有些麻烦。现在我运行 sudo nautilus ,我看到 Home 是/ro
我想在 ionic 中制作一个应用程序,所以我通过命令在 ionic 中添加了一些自定义页面: ionic g 页面用户 但是我启动 ionic 服务器它显示错误 Runtime Error Cann
非常感谢您的帮助。 标题说明一切:使用有什么区别: echo `basename $HOME` 和 echo $(basename $HOME) 请注意,我知道 basename 命令的作用,两种语法
在 Rust 中,默认情况下,文件放在 $HOME/.cargo 和 $HOME/.rustup 中。有什么方法可以覆盖这些默认值吗? 我正在尝试调试一个模糊的问题,我想尝试更改文件位置。 最佳答案
我正在尝试以 root 身份备份机器的一些关键文件和目录,包括一些/home 数据,手动挑选一些文件以减小 tarball 大小。大多数情况下一切正常,因为大多数文件无论如何都归 root 所有,但说
如果菜单项是链接,屏幕阅读器应该将其读作“主页、链接、菜单项”还是“主页、菜单项”? 目前,屏幕阅读器将它读作“主页、链接、菜单项”,但我得到的是关于它的混合信息。一些信息说它应该是“主页、链接、菜单
我在一个有多个组织的项目上使用 php codeigniter。每个组织都会有自己的网站,我需要根据组织名称将每个用户重定向到其组织网站。 我得到了部分运行。以本地主机为例: localhost/ap
我正在 Mac OS X 上安装 Ruby on Rails。我遵循的教程说要添加: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/script
我是一名优秀的程序员,十分优秀!