NodeJS actually using OAuth (Twitter)
I am using node (8.14.0) and want to access the Twitter REST API v1.1. I tried node-Oauth so far and simple https, but none of them worked further then "login with twitter". I don't just want to authenticate user's (aka sign in with twitter), I want to perform actions on the API with their access. My problem is, I have not found a single example for node describing the actual process of retrieving the needed access/request tokens from the user and performing the API call with them.
All node-oauth examples "assume that you already have access token and access whatever". Well I do not have them, and I do not know how to get them, since I find no concrete example or documentation. Only a reference to a reference.
As I know the oauth libraries are to authenticate or authorize.
While the authentication you get back the accestoken and refreshtoken from the platform.
This tokens you have to save in your session or database.
After that you can use it in combination with other libraries.
I suggest to have a look at passport or everyauth for user authentication. They both support oauth.
Google has a pretty good documentation about OAuth in general. I think this schema can be applied to other platforms too.