1
votes

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

1 Answers

0
votes

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