All Projects → heroku → heroku-cli-oauth

heroku / heroku-cli-oauth

Licence: ISC license
this code is now in https://github.com/heroku/cli

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to heroku-cli-oauth

heroku-cli-deploy
No description or website provided.
Stars: ✭ 23 (-42.5%)
Mutual labels:  heroku, heroku-cli-plugin
heroku-slugs
CLI Plugin to manage downloading of slugs
Stars: ✭ 36 (-10%)
Mutual labels:  heroku, heroku-cli-plugin
heroku-local
this code is now in https://github.com/heroku/cli
Stars: ✭ 21 (-47.5%)
Mutual labels:  heroku, heroku-cli-plugin
heroku-postico
Heroku Postgres connection tool for Postico
Stars: ✭ 37 (-7.5%)
Mutual labels:  heroku, heroku-cli-plugin
buildpacks-ruby
An experimental Cloud Native Buildpack for Ruby
Stars: ✭ 15 (-62.5%)
Mutual labels:  heroku
pack-images
Recipies for building Heroku's Cloud Native Buildpacks builder images
Stars: ✭ 32 (-20%)
Mutual labels:  heroku
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-67.5%)
Mutual labels:  heroku
quirrel.dev
Quirrel Landing Page & Console
Stars: ✭ 41 (+2.5%)
Mutual labels:  heroku
starter-kit
Starter kit for full-stack JavaScript projects
Stars: ✭ 21 (-47.5%)
Mutual labels:  heroku
django-kcproject-starter
Kickstart Coding's Django Project Starter Template
Stars: ✭ 14 (-65%)
Mutual labels:  heroku
ChartTheStockMarket
🔥 📈 💸 Chart the Stock Market - FCC Challenge
Stars: ✭ 39 (-2.5%)
Mutual labels:  heroku
Tasks
Simple tasks & notes manager written in PHP, jQuery and Bootstrap using a custom flat file database.
Stars: ✭ 102 (+155%)
Mutual labels:  heroku
honeyku
A Heroku-based web honeypot that can be used to create and monitor fake HTTP endpoints (i.e. honeytokens).
Stars: ✭ 56 (+40%)
Mutual labels:  heroku
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-65%)
Mutual labels:  heroku
nlg-markovify-api
An API built on Plumber (R) utilizing Markovify, a Python package, wrapped in markovifyR (R). It builds a Markov Chain-model based on text (user input) and generates new text based on the model.
Stars: ✭ 19 (-52.5%)
Mutual labels:  heroku
Discord-Study-Bot
Discord-Study-Bot is a Study-Time-based leaderboard system in discord servers. This features an Overall leaderboard and leaderboards based on a Daily, Weekly, and Monthly basis.
Stars: ✭ 20 (-50%)
Mutual labels:  heroku
ai-image-recognition-web
Derin Öğrenme Kütüphanesi Keras ile Python Flask Web Framework Üzerinde Nesne Tanıma Uygulaması - https://vision-image-classify.herokuapp.com/
Stars: ✭ 24 (-40%)
Mutual labels:  heroku
teller
Cloud native secrets management for developers - never leave your command line for secrets.
Stars: ✭ 998 (+2395%)
Mutual labels:  heroku
IsSeptaFcked
Real-time status for Philadelphia Regional Rail
Stars: ✭ 47 (+17.5%)
Mutual labels:  heroku
telemirror
Telegram forwarder from channels via Telegram Client API (telethon)
Stars: ✭ 66 (+65%)
Mutual labels:  heroku

Heroku OAuth CircleCI

Code Climate npm version License

js-standard-style

Command line plugin for managing OAuth clients, authorizations and tokens.

No need to install, this plugin comes built into the Heroku CLI.

Clients

To create a client:

$ heroku clients:create "Amazing" https://amazing-client.herokuapp.com/auth/heroku/callback
Creating Amazing... done
HEROKU_OAUTH_ID=3e304bda-d376-4278-bdea-6d6c08aa1359
HEROKU_OAUTH_SECRET=e6a5f58f-f8a9-49f1-a1a6-d1dd98930ef6

See OAuth clients under your account with:

$ heroku clients
Amazing  3e304bda-d376-4278-bdea-6d6c08aa1359  https://amazing-client.herokuapp.com/auth/heroku/callback

Get details about a client:

$ heroku clients:info 36120128-fee7-455e-8b7f-807aee130946
=== Amazing
created_at:         2016-01-21T02:11:57Z
id:                 36120128-fee7-455e-8b7f-807aee130946
name:               Amazing
redirect_uri:       https://amazing-client.herokuapp.com/auth/heroku/callback
secret:             a14cf558-60b8-44f2-a804-3b249b48aa57
updated_at:         2016-01-21T02:11:57Z

Update clients:

$ heroku clients:update 3e304bda-d376-4278-bdea-6d6c08aa1359 --url https://amazing-client.herokuapp.com/auth/heroku/callback
Updated Amazing... done

Authorizations

List them:

$ heroku authorizations
Amazing                        9e3a4063-b833-432e-ad75-4b0d7195be13  global
Heroku CLI                     676cb46c-7597-4be1-8a6a-f87b9f2f1065  global

Creating

You can create a special user-created authorization against your account that will come with an access token which doesn't expire:

$ heroku authorizations:create --description "For use with Anvil"
Created OAuth authorization.
  ID:          105a7bfa-34c3-476e-873a-b1ac3fdc12fb
  Description: For use with Anvil
  Token:       4cee516c-f8c6-4f14-9edf-fc6ef09cedc5
  Scope:       global

You can also pass in short output format to only output the token.

$ heroku authorizations:create --output-format short
nec6a9b6-b21a-4ba1-il95-70zd47e14c4d

Another option allows for tokens that expire. This token expires in 10 seconds.

$ heroku authorizations:create --expires-in 10
Created OAuth authorization.
  Client:      <none>
  ID:          2231biha6-5b1e-4268-ba04-2ee7b74m2gf6
  Description: Long-lived user authorization
  Scope:       global
  Token:       9aa5d667-fg37-4028-8dc9-b2191b5z5966

A combination of short format and expires-in can be handy to pass into a job that needs access to heroku:

$ heroku run "HEROKU_EMAIL=`heroku auth:whoami` HEROKU_API_KEY=`heroku authorizations:create --expires-in 120 --output-format short` ./my_job.sh" -a myapp

Optionally, you can specify a list of scopes for the authorization:

$ heroku authorizations:create --description "For use with Anvil" --scope identity,read-protected
Created OAuth authorization.
  ID:          105a7bfa-34c3-476e-873a-b1ac3fdc12fb
  Description: For use with Anvil
  Token:       4cee516c-f8c6-4f14-9edf-fc6ef09cedc5
  Scope:       identity, read-protected

The procured token can now be used like an API key:

$ curl -u ":4cee516c-f8c6-4f14-9edf-fc6ef09cedc5" https://api.heroku.com/apps

Revoking

Any authorization on your account can be revoked at any time:

$ heroku authorizations:revoke 105a7bfa-34c3-476e-873a-b1ac3fdc12fb
Revoked authorization from "Another App".
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].