- heroku addons:create heroku-postgresql:hobby-dev
- heroku config
- Copy the POSTGRES_URL to .env file
- Connect to db and import the users table in db.sql file
- Create or use existing IG app from developer portal
- Copy app id and secret to environment variables i. Put env variables in .env file ii. Set up deployment (heroku in this example) env variables
- Set up redirect urls in the app in InstagramStrategy object config
- Add the callback urls to instagram app's whitelisted redirect urls
You need to create and place all configuration about your database, instagram app details in .env file or in your target platform's environment variables. The env file or variables listed below:
DATABASE_URL=postgres://...
INSTAGRAM_CLIENT_ID=9d024....
INSTAGRAM_CLIENT_SECRET=082fd...
INSTAGRAM_CALLBACK_URL=https://...
- npm install
- node index.js
- git init
- heroku login
- heroku create
- git push heroku master
Note: You may get blocked url when /auth/instagram redirects to instagram's oauth pages due to Instagram's blocks on heroku IP addresses. If you see this, the heroku instance you deployed will not be able to work with Instagram oauth. Deploy somewhere else or use outboud proxy services like Proximo on heroku instance to solve this issue.