Skip to content

Sample application demonstrating how to perform OAuth 2.0 Web Server Flow with Salesforce

Notifications You must be signed in to change notification settings

kyleballard/salesforce-oauth-web-server-flow

Repository files navigation

Salesforce OAuth2 Web Server Flow Example

This example is to complement a blog post available at (post link coming soon) which outlines how to use the Web Server Flow method of OAuth authentication with Salesforce, .NET Core, and ngrok.

Prerequisites

Installation

Once you have setup your Salesforce Developer account, and defined the 'Connected App', update appsettings.json file with your client-id and client-secret. Note: You should convert this to use user-secrets in development, and environment variables and/or azure key vault in production to ensure security.

Once settings are updated, crun the following commands from your favorite command console. Mine is ConEmu.

dotnet build
dotnet run

Usage

Below is an example diagram from Salesforce that outlines how the flow works. In our demo application, this follow happens inside the SalesforceController.cs and you can start your code navigation from there.

alt text

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Sample application demonstrating how to perform OAuth 2.0 Web Server Flow with Salesforce

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published