账户将Alexa与Twitter链接-Amazon Echo [英] Account Linking Alexa with 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:
- 在Alexa应用中启用技能
- 单击登录到alexa应用程序中的帐户
- Twitter登录屏幕会显示,我输入用户名和密码,然后单击登录按钮
- 将重定向到Amazon提供的URL回调一旦通过身份验证并获得无法链接您的技能。
- Enable skill in Alexa app
- Click 'sign in to account' in alexa app
- Twitter Login screen is displayed and I enter user name and password then click Login button
- 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 ('&')?
这篇关于账户将Alexa与Twitter链接-Amazon Echo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!