Giter Site home page Giter Site logo

davidj0525 / visual-oauth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from launchcodeeducation/visual-oauth

0.0 0.0 0.0 1.15 MB

A tool to learn about OAuth in a step-by-step interactive environment

License: Other

JavaScript 95.66% HTML 1.68% Shell 1.21% PowerShell 1.45%

visual-oauth's Introduction

Visual OAuth

A tool to learn about OAuth in a step-by-step interactive environment.

Usage

  1. clone this application repo
  2. create a GitHub OAuth Application
  3. set up the application
  4. run the application
  5. view in browser and begin learning!

Clone the repo

# clone into current directory
$ git clone https://github.com/LaunchCodeEducation/visual-oauth

# optionally give a clone path as the second argument
$ git clone https://github.com/LaunchCodeEducation/visual-oauth /path/to/cloned/repo

creates the following directory structure

visual-oauth/
  README.md
  package.json <-- root scripts to setup / run the client and API servers
  api/
    ...api code
  client/
    ...client code

Register your own GitHub OAuth app

create a GitHub OAuth App to get your Client ID and Secret

  • click your github profile (top right corner) and go to settings
  • scroll down to developer settings in the sidebar
  • select oauth apps
  • select new oauth app
  • give a name for your app: YOUR_NAME Visual OAuth
  • for homepage url enter: http://localhost:3000/
  • for authorization callback url enter: http://localhost:3000/
  • click register application

leave this tab open to copy over the Client ID and Secret when prompted in the next step

Set Up Visual OAuth

Linux and MacOS

# run this from the root directory of the repo
$ npm run setup

# you will be prompted for [GitHub Client ID] and [GitHub Client Secret] from when you registered your GitHub oauth app

Windows

# run this from the root directory of the repo
> npm run setup:windows

# you will be prompted for [GitHub Client ID] and [GitHub Client Secret] from when you registered your GitHub oauth app

Run Visual OAuth

The client startup script will automatically open your default browser to http://localhost:3000 after it is done loading.

NOTE: it may take up to 30 seconds for the client application to start up

If your browser doesn't open automatically click this link http://localhost:3000

you can stop the app using ctrl+C in the terminal

Linux and MacOS

# run this from the root directory of the repo
$ npm run start

Windows

In Windows you will need to start both the API and Client separately in two different PowerShell terminals.

In your first PowerShell terminal:

# run this from the root directory of the repo
> npm run start:api

In your second PowerShell terminal:

# run this from the root directory of the repo
> npm run start:client

WARNING: Windows Browsers

This example will not work in Microsoft Edge, or Microsoft Internet Explorer.

If Edge, or IE are your default browser you will need to open a legitimate browser like Firefox and manually navigate to http://localhost:3000.

visual-oauth's People

Contributors

the-vampiire avatar dependabot[bot] avatar pdmxdd avatar

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.