Git Product home page Git Product logo

developer-dashboard's Introduction

developer-dashboard

Video of Dev Dash

This application allows for users to register, sign in, and create OAuth service clients that can be used to retrieve tokens from your Okta Authorization Servers, and use those to hit custom APIs! It leverages OAuth for Okta APIs as well, so that the application is tightly scoped to only allow for the creation/deletion of these service applications themselves. Try generating an OAuth client and then using postman or any command-line tool to hit the https://developer.okta.com/docs/reference/api/oidc/#token endpoint in okta via the client credentials flow.

Project setup

npm install

Create a .env file and copy the keys from .env.sample. Do the same for /src/.config.js. Then go to your Okta tenant to get the client Id, Issuer, org url and api token

touch .env
touch ./src/.config.js

If you don't already have an application configured in Okta,head to Applications > Create new App and specify "SPA" as the type. Remember to assign yourself the app as well.

Run the following script to set up your org for O4O: (it's important that you only run this once)

node O4OScript.js

This script is necessary to create a backend service client to generate O4O tokens for the purposes of allowing our developer dashboard to hit Okta Lifecycle APIs with properly scoped tokens (i.e. only allowing the app to create/read clients). In order to do so, we are:

  1. Generating a public/private RSA keypair, converting into JwKs
  2. Registering a client with those JwKs using the private_key_jwt method of authentication, storing the O4O client id in the .env file
  3. Using the apps/{appid}/grants api to grant that client access to manage applications (to mint new clients)

More documentation on that entire process here: https://developer.okta.com/docs/guides/implement-oauth-for-okta/overview/

It's important that you only run this script once.

This script populates your .env file as well as local private keys for the project itself. If you need to run it again or start fresh, run the following script:

node O4OScriptDestroy.js

Which will do the following:

  1. Delete up the .jwk, .pem files generated from the project directory, and clear the O4O_CLIENT_ID line from your env file
  2. Remove the "DevDashboard-O4OClient" generated in your okta tenant

We're ready to go! run the project

npm run start

developer-dashboard's People

Contributors

andrewvanbeek-okta avatar andrewvanbeek avatar maxpollard-okta avatar

Stargazers

David Keitel avatar Austin avatar Rick Jones avatar Matt Dorn avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

maxpollard-okta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.