NesTar6 / salesforce-react-integration

Sample integration project between Salesforce and a React.js application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Salesforce React.js integration

About

Sample integration project between Salesforce and a React.js application.

This application demonstrates the following concepts:

  • using JSforce as a Salesforce client
    • authenticating with OAuth 2.0 (login, logout, retrieving session info)
    • using the REST API to run a SOQL query
  • using the Salesforce Lightning Design System (SLDS) in a web application (all the CSS is provided by SLDS)

Installation

  1. Create a Connected App in Salesforce.

  2. Create a .env file in the root directory with this content (make sure to replace the values):

    domain='https://login.salesforce.com'
    callbackUrl='http://localhost:8080/auth/callback'
    consumerKey='YOUR_CLIENT_KEY'
    consumerSecret='YOUR_CLIENT_SECRET'
    apiVersion='48.0'
    
    isHttps='false'
    sessionSecretKey='A_SECRET_STRING'
    
  3. Run npm run build to build the app.

  4. Run npm start to start the app.

Screenshots

Login screen Main screen

About

Sample integration project between Salesforce and a React.js application

License:Apache License 2.0


Languages

Language:JavaScript 97.3%Language:HTML 2.7%