gpt4 book ai didi

oauth - 为 Amazon Alexa Connected Home 技能设置 Oauth 的简单方法是什么?

转载 作者:行者123 更新时间:2023-12-04 16:25:41 26 4
gpt4 key购买 nike

我正在尝试对 Alexa Connected Home 技能进行原型(prototype)设计,其中一项要求是使用 Oauth 2.0 链接用户帐户。由于我只是在构建一个原型(prototype)并且我没有启动和运行 Oauth 服务器,因此满足 Amazon Oauth 要求的最简单方法是什么?

我已尝试按照 Tips for Using Login with Amazon in Alexa Connected Home CoHo Skills 上的说明进行操作但无论我尝试什么,它都失败了,并显示了无意义的错误消息。

  • 有没有人通过亚马逊登录以使用 Alexa Connected Home?
  • 是否有我可以使用的易于使用的 Oauth 提供程序?
  • 最佳答案

    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 工作,我做了以下工作:
  • 打开 Amazon Alexa 开发者控制台,进入技能的配置选项卡(包含 Account Linking 信息的页面。
  • 设置 授权 URL https://www.amazon.com/ap/oa
  • 范围 设置为 profile:user_id
  • 访问 token URI 设置为 https://api.amazon.com/auth/o2/token
  • 复制此页面中用于使用 Amazon 登录配置的 重定向 URL (例如重定向 URL:https://pitangui.amazon.com/api/skill/link/xxxxxxxxx)。
  • 遵循 Tips for Using Login with Amazon in Alexa Connected Home CoHo Skills 中的步骤 1、2 和 3 中的大部分,以获取“使用 Amazon 登录作为您的 OAuth 提供者”。

  • 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.

    https://cdn.amazonblogs.com/developer_blog/images/lwa5.png

    Fill in the required information and hit Save.

    https://cdn.amazonblogs.com/developer_blog/images/lwa6.png

    Step 2 - Obtain Your OAuth Credentials

    Your newly created security profile will now be available in the list of Login with Amazon Configurations.

    https://cdn.amazonblogs.com/developer_blog/images/lwa7.png

    You will receive the Client ID and Client Secret. Please include this information when you submit your skill adapter for test provisioning.

    https://cdn.amazonblogs.com/developer_blog/images/lwa8.png

    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://cdn.amazonblogs.com/developer_blog/images/lwa9.png Next, click Edit on the page, and enter the following data:


  • 这是我停止遵循该博客文章中的说明的时候。我现在设置 Allowed Origins Allowed Return URLs Allowed Origins 应该是 https://amazon.com ,并且 Allowed Return URLs 应该是 Redirect URL Redirect URL 从 Alexa 开发者控制台 0x104 的帐户链接页面复制
  • 从 Login With Amazon 控制台复制 客户端 ID 客户端密码 并将它们粘贴到 客户端 ID 和 0x1045467919 的 Alexa 开发人员字段 0x1045467919 客户端密码 0x
  • 关于oauth - 为 Amazon Alexa Connected Home 技能设置 Oauth 的简单方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37512303/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com