- A Twitter account, with developer account enabled
- Setup an app and generate CLIENT_ID & CLIENT_SECRET
- Generate SECRET_KEY, SECRET_IV & ENCRYPTION_METHOD to be used in crypto.createCipheriv()
create a .env
file
REDIRECT_URL=http://localhost:23001/redirect
CLIENT_ID=
CLIENT_SECRET=
SECRET_KEY=
SECRET_IV=
ENCRYPTION_METHOD=
You need to run (one time) an authorization flow via browser
- Start the server for the redirect flow
npm run auth
- Go to:
http://localhost:23001/auth
- Authorize app
Refresh token will be saved (encrypted) to a local store
npm run build:image
(replace XXX with real values)
docker run -d -e CLIENT_ID=XXX -e CLIENT_SECRET=XXX -e SECRET_KEY=XXX -e SECRET_IV=XXX -e ENCRYPTION_METHOD=XXX -v no-context-mashina:/usr/app/ext --name no-context-mashina --restart unless-stopped no-context-mashina
npm run copy-tokens-to-container