{"repo":"JitendraZaa/OAuthFlows","free":true,"listed":false,"github":"https://github.com/JitendraZaa/OAuthFlows","clone":"git clone https://github.com/JitendraZaa/OAuthFlows.git","description":"Salesforce Oauth Flows","language":"JavaScript","stars":42,"topics":["oauth2","jwt","jwt-authentication","salesforce","json-web-token","json-web-signature"],"license":null,"category":"auth-billing-email","readme_excerpt":"JWT, Web Server and User Agent OAuth flow in Salesforce using Node.js Steps to run Step 1 Clone this repository (Assuming Node.js already installed on system) Step 2 Create a ssl certificate or reuse same certificate uploaded in this repository. Refer this post to learn how to create ssl certificate using openssl Step 3 Create Connected App in your Salesforce instance with callback URL - https://localhost:8081/oauthcallback.html . Make sure to upload server.crt as a digital certificate in connected app. You can use your own certificate as well. Step 4 Copy consumer key & secret created in connected app and update jwt consumer key and client secret variable defined in Server.js file. Step 5 Run npm install command in the directory where this code was downloaded. It will download all the required node modules. Then run npm start , or nodemon Server.js (if installed previously) it will start the server Step 6 Navigate to https://localhost:8081/ in your browser and you would see option for all 3 Auth flow - JWT, User Agent and Web Server . Considerations Client Credential Flow 1. CC Flow on API only User 1. It only accepts My Domain URL Canvas Demo 1. Create Connected App & Enable Canvas in setting 2. Add https://localhost:8081/ as callback URL and https://sfdccanvasnodejs.herokuapp.com/signedrequest as canvas URL 3. Update policy of connected app to allow per approved users to login 4. Add System admin as allowed profile in Connected App 5. Add Canvas app in contact pagelayout 6","default_branch":null,"files":null,"tree":[],"storefront":"/r/JitendraZaa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JitendraZaa/OAuthFlows/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}