账户将Alexa与Twitter链接-Amazon Echo [英] Account Linking Alexa with Twitter - Amazon Echo

查看:164
本文介绍了账户将Alexa与Twitter链接-Amazon Echo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我似乎无法将我的Alexa技能与Twitter关联。当前,我有一个运行在EBS上的节点/快速服务器,我正在使用 passport-twitter 来处理身份验证的oauth部分。现在我的流程是这样的:

As of now I cannot seem to get my Alexa skill linked with twitter. Currently, I have a node/express server running on EBS which, I am using passport-twitter to handle the oauth part of the authentication. Right now my flow is such:


  1. 在Alexa应用中启用技能

  2. 单击登录到alexa应用程序中的帐户

  3. Twitter登录屏幕会显示,我输入用户名和密码,然后单击登录按钮

  4. 将重定向到Amazon提供的URL回调一旦通过身份验证并获得无法链接您的技能。

  1. Enable skill in Alexa app
  2. Click 'sign in to account' in alexa app
  3. Twitter Login screen is displayed and I enter user name and password then click Login button
  4. get redirected to Amazon provided url for callback once authenticated and get an 'Unable to link you skill'.

我已经登录并进行了所有操作,所以我认为重定向存在问题,重定向是在快递服务器上的twitter auth回调中定义的,如下所示:

I login and everything, so I think issue is with redirection, which is defined in the twitter auth callback on my express server like so:

app.get('/auth/twitter/callback',
passport.authenticate('twitter', {failureRedirect: '/login'}),
function(req, res){

  var redirectUrl= 'https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR508CPU9#state='
  +state+'&access_token='+myToken+'&token_type=Bearer';

  res.redirect(302, redirectUrl);
});

我的重定向网址(减去敏感数据)为
https://pitangui.amazon.com/spa/skill/account-linking -status.html?vendorId = M28J2SR5BLAH#state = & access_token =& token_type = Bearer

My redirect url, minus the sensitive data, is https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR5BLAH#state=&access_token=&token_type=Bearer

关于如何调试/排除故障的任何想法,以及

Any ideas on how to debug/troubleshoot as well as any suggestions to fix issue would be awesomely appreciated.

推荐答案

在状态 URL前面有一个井号(#),您将大受赞赏。参数。

You have a hash ('#') before the 'state' URL parameter. Perhaps you meant for that to be an ampersand ('&')?

https://pitangui.amazon.com/spa/skill/account-linking-status。 html?vendorId = M28J2SR5BLAH& state =& access_token =& token_type = Bearer

这篇关于账户将Alexa与Twitter链接-Amazon Echo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆