expo/examples

with-twitter-oauth: Request token missing error

NoureddinBakir opened this issue · 2 comments

Describe the bug
Getting 'Request token missing' from serverside backend. I have the backend running on a Replit Repl, and I'm getting 'Request token missing' even tough I didn't change any of the backend code. I am checking that we are getting the verifier tokens and that all auth params are satisfied. I am also able to authorize my Twitter app, so nothing wrong with the Twitter API.

To Reproduce
Steps to reproduce the behavior:

  1. Follow instructions on 'examples/with-twitter-auth'
  2. get it to run
  3. I have my backend running on Replit (copy and paste!)
  4. after completing all authorizing steps on the app, and authorizing my Twitter app, it seems there is a problem with returning the tokens becuase my backend throws an error while fetching access tokens.

Expected behavior
after authorizing my Twitter app, all tokens should be returned properly and it should work properly.

Screenshots
Screen Shot 2022-01-02 at 1 46 38 PM
Screen Shot 2022-01-02 at 1 50 41 PM

Solved! You need to rename your options in order for the authentication (step #3) to complete
const options = { oauth_token: req.query.oauth_token, oauth_token_secret: req.query.oauth_token_secret, oauth_verifier: req.query.oauth_verifier, };

Thanks for catching that @NoureddinBakir and providing the solution!

Was able to reproduce this on my end. Will update the backend code for this.