Hello Okta Community,
I am currently working on a React app written in TypeScript that implements “Login with Salesforce” using OAuth 2.0 authentication. Here’s the current flow:
- User clicks the login button in the React app.
- User is redirected to Salesforce for authentication.
- Upon successful authentication, Salesforce returns a code.
- The app exchanges the code for an access token via Salesforce API.
I want to integrate this flow with Okta so that the authentication happens seamlessly through Okta. The desired flow is:
- User logs in to Okta using their username and password.
- User sees the React app in the Okta dashboard.
- User clicks on the app icon, and the app opens with the user already authenticated via Salesforce, without needing to redirect to Salesforce for authentication again.
Essentially, I want to achieve Single Sign-On (SSO) where logging in to Okta also logs the user into Salesforce and grants access to my React app.
Could you please guide me on how to set up this flow? What configurations are needed in Okta and Salesforce? Any examples or documentation references would be highly appreciated.
Thank you!