我正在尝试对 Alexa Connected Home 技能进行原型(prototype)设计,其中一项要求是使用 Oauth 2.0 链接用户帐户。由于我只是在构建一个原型(prototype)并且我没有启动和运行 Oauth 服务器,因此满足 Amazon Oauth 要求的最简单方法是什么?
我已尝试按照 Tips for Using Login with Amazon in Alexa Connected Home CoHo Skills 上的说明进行操作但无论我尝试什么,它都失败了,并显示了无意义的错误消息。
最佳答案
tl;博士
使用亚马逊控制台登录:
Allowed Origins: https://amazon.com
Allowed Return URLs: <copied from "Redirect URL" in the Alexa Developer Console>
Alexa 开发者控制台:
Authorization URL: https://www.amazon.com/ap/oa
Access Token URI: https://api.amazon.com/auth/o2/token
Scope: profile:user_id
Client Id: <copied from "Client Id" in the Login With Amazon Console. eg. amzn1.application-oa2-client.xxxxxxxxxxx >
Client Secret: <copied from "Client Secret" in the Login With Amazon Console.>
我能够使用 Login with Amazon 作为 Oauth 提供者。我按照 Login with Amazon Web Developer Guide 中的文档找到了我一直缺少的配置。
为了让 Login With Amazon 工作,我做了以下工作:
https://www.amazon.com/ap/oa
profile:user_id
https://api.amazon.com/auth/o2/token
Step 1 - Create a New Security profile
To create a new security profile on Login with Amazon, go the Developer Console and navigate to Login with Amazon by clicking on Apps & Services. Once you are on the Login with Amazon developer console page, click the Create a New Security Profile button.
Fill in the required information and hit Save.
Step 2 - Obtain Your OAuth Credentials
Your newly created security profile will now be available in the list of Login with Amazon Configurations.
You will receive the Client ID and Client Secret. Please include this information when you submit your skill adapter for test provisioning.
Click Show.
Step 3 - Whitelist Your Alexa Connected Home Skill
Next, we need to whitelist the Alexa Connected Home skill’s endpoints within your Login with Amazon security profile. First, enter the Web Settings of your security profile:
https://amazon.com
,并且 Allowed Return URLs 应该是 Redirect URL Redirect URL 从 Alexa 开发者控制台 0x104 的帐户链接页面复制关于oauth - 为 Amazon Alexa Connected Home 技能设置 Oauth 的简单方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37512303/