Giter Club home page Giter Club logo

sample-app-mycors-javascript's Introduction

MyCORS Sample Application: React

Introduction

MyCORS is a Docusign sample application that shows how to construct Single Page Applications (SPAs) that leverage Docusign support for Cross-Origin Resource Sharing (CORS). This sample application is created using React.js. You can find a live instance running at https://mycors.sampleapps.docusign.com/.

MyCORS demonstrates the following:

  1. Authentication with Docusign via Implicit Grant.
  2. Send Insurance Card: This example uses the Docusign eSignature REST API to request a signature by email with Document Generation using a predefined template in docx format.
  3. Know Your Customer: This example uses the Docusign eSignature REST API to request a signature through your application using Embedded Signing.

Prerequisites

  • Create a Docusign Developer Account.

  • Create an application on the Apps and Keys page.

  • Set Authentication Method for your application to Implicit Grant. Under User Application: Is your application able to securely store a client secret, select No.

  • Add redirect URIs:

    • { PROTOCOL }://{ DOMAIN }/
    • { PROTOCOL }://{ DOMAIN }/oauth-response-handler/
    • { PROTOCOL }://{ DOMAIN }/ds-response-handler/
  • Update CORS Configuration:

    • Origin URLs: { PROTOCOL }://{ DOMAIN }
    • Allowed HTTP Methods: GET, POST, PUT
  • Installed and configured Node.js

  • Installed and configured Docker

Variables configuration

Create a copy of the file .env.example, save the copy as .env, and fill in the data:

  • REACT_APP_OAUTH_CLIENT_ID - integration key of the application created in section "Create an application on the Apps and Keys page" above (GUID)
  • REACT_APP_OAUTH_RETURN_URL - internal redirection URL that is used during the authentication
  • REACT_APP_DS_RETURN_URL - internal redirection URL that is used during the enbedded signing process

Local installation instructions (without Docker)

  1. Clone the git repository to your local machine.

  2. Open a terminal in /sample-app-mycors-javascript directory.

  3. Install required application packages runing the following command in the terminal:

    npm install
    
  4. Start the application runing the following command in the terminal:

    npm start
    
  5. Open a browser to localhost:3000 (if the page is not openned automatically after step #4).

Local installation instructions (using Docker)

  1. Clone the git repository to your local machine.

  2. Open a terminal in /sample-app-mycors-javascript directory.

  3. Build the docker image runing the following command in the terminal:

    docker build -t docusign_sample_mycors .
    
  4. Start the application (run the Docker container) with the following command in the terminal:

    docker run -p 80:80 -d docusign_sample_mycors
    
  5. Open a browser to localhost

License information

This repository uses the MIT License. See the LICENSE file for more information.

sample-app-mycors-javascript's People

Contributors

inbargazit avatar mykyta-petrov avatar karissarjacobsen avatar mattlusher avatar

Stargazers

 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.