You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ever want to use the Heroku API to auth a user to let them do something with Heroku? With heroku-bouncer and heroku-api it's super simple.
General Idea
Start up the server, any endpoint will redirect you to an auth page for Heroku. Once authorized visit / and you'll see a list of all your apps. Click on an app for more info.
It's purposfully barebones, but a good place to get started with a super simple Heroku API backed app.
Install
Clone the repo then run:
$ bundle install
Then create a .env file:
$ touch .env
Next you need to set up your OAuth:
Set up OAuth
This project uses OAuth to obtain authorization to fetch your application’s logs using the Heroku API. To make this work, you have to register an OAuth client with Heroku. The easiest way to do this is on your account page on the Heroku Dashboard. Enter https://localhost:5000/auth/heroku/callback when prompted for a callback URL. The OAuth developer doc has additional details on client creation and OAuth in general.
When registering the client you get an OAuth client id and secret. Add these as HEROKU_OAUTH_ID and HEROKU_OAUTH_SECRET environment variables to your application’s .env.