在Lambda函数中,Chrome窗口将自动打开以进行身份验证。请在LWA中使用正确的凭据进行身份验证以解决此问题。以下是参考代码示例:
const authClient = new LoginWithAmazon({ clientId: 'YOUR_CLIENT_ID', clientSecret: 'YOUR_CLIENT_SECRET', redirectUri: 'YOUR_REDIRECT_URI' });
// Pass authclient in as parameter authClient.authorize({ scope: 'alexa::household:voice:skill:readwrite', scope_data: { 'alexa:household:list:write': { 'status': 'PENDING' } } }, (error, response) => { if (error) { console.log(error); } else { console.log(response); } });