Giter Club home page Giter Club logo

oauth2-react-intuit's Introduction

React OAuth2.0 Intuit

Overview

This is a sample app bootstrapped with Create React App to show how to login using Intuit's OAuth2.0 Client library.

Installation

Requirements

Via Github Repo (Recommended)

$ git clone https://github.com/anilkumarbp/oauth2-react-intuit
$ cd react-oauth2-intuit
$ yarn install

Configuration

Edit the .env file to add your:

  • PORT:(optional) Optional port number for the app to be served
  • REACT_APP_CLIENT_ID Enter your client_ID from Intuit Developer Portal
  • REACT_APP_CLIENT_SECRET Enter your client_Secret from Intuit Developer Portal
  • REACT_APP_ENVIRONMENT =sandbox
  • REACT_APP_REDIRECT_URI http://localhost:3000/login (default)
  • REACT_APP_PROXY_URL http://localhost:5000/authenticate (default)
  • REACT_APP_AUTHORIZE_URL http://localhost:5000/authorizeUrl (default)
  • REACT_APP_SCOPES com.intuit.quickbooks.accounting openid email phone profile (space seperated : default)
  • SERVER_PORT 5000 (default)

Usage

Before you start the app , enter the Redirect URI in your app’s Keys and OAuth section under Development.

Redirect URI : http://localhost:3000/login

$ yarn start

Open http://localhost:3000 and voilà !

If you would like to test the app using https refer to the section below.

TLS / SSL (optional)

If you want your enpoints to be exposed over the internet. The easiest way to do that while you are still developing your code locally is to use ngrok.

ONLY when you have ngrok setup follow the steps below :

  1. Start ngrok on the root path
$ cd oauth2-react-intuit
$ ngrok http 3000 -host-header="localhost:3000"
  1. Update Redirect URI in two places :
  • .env -> change the REACT_APP_REDIRECT_URI to https forwarding url from Step 1 above.
    (ex: https://d3d98c1ea00f.ngrok.io/login)
  • Login to Intuit Developer Portal and update the Redirect URL for your app under Production keys
  1. Run the App (in a different terminal from the root path)
$ cd oauth2-react-intuit
$ yarn start

Open the URL from ngrok which looks like https://d3d98c1ea00f.ngrok.io/ and voilà !

oauth2-react-intuit's People

Contributors

abisalehalliprasan avatar anilkumarbp avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sam-c-freeman

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.