Login with Amazon (LWA) 服务
使用 LWA 服务，实现OAuth 用户登录。https://developer.amazon.com/loginwithamazon/console/site/lwa/overview.html
- 打开 https://developer.amazon.com/login.html 并登录你的 Amazon 账户
- 点击 “Apps & Services”, 然后 “Login with Amazon”
- 点击 “Create a New Security Profile” 创建安全档案
- Fill in all three required fields to create your security profile and click “Save”.
- Before you complete this step, be sure to click on the link named “Show Client ID and Client Secret” and save these values to a secure location so they're easily available later. You’ll need these values later in a future step.
创建 Lambda 功能
Now that you have all the components, let's put everything together. These steps assume you're using LWA for account linking:
- Go back to https://developer.amazon.com/home.html and sign in as needed
- Go to Alexa > Alexa Skills Kit > the test skill you created earlier
- In the Configuration tab:
- Lambda ARN default = enter your Lambda ARN noted from the previous step
- Authorization URI = https://www.amazon.com/ap/oa
- Client ID = your client ID from LWA noted in a previous step
- Scope: profile (click Add Scope first to add)
- Access Token URI: https://api.amazon.com/auth/o2/token
- Client Secret: your client secret from LWA noted in a previous step
- Client Authentication Scheme: HTTP Basic (Recommended)
- Click Save
- Provide Redirect URL's to LWA:
- The Configuration page for your Skill lists several Redirect URL's. Open the LWA security profile you created earlier and visit the Web Settings dialog. Provide each of the Redirect URL values from your Skill in the Allowed Return URL's field.