Account Linking Alexa with Twitter - Amazon Echo

情到浓时终转凉″ 提交于 2019-12-19 11:04:35

问题


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

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);
});

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.


回答1:


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



来源:https://stackoverflow.com/questions/37077214/account-linking-alexa-with-twitter-amazon-echo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!