OAuth 2.0 Authentication Flow
The authentication flow depends on the state of authentication on the device. The following steps assume that Salesforce authentication occurs at app startup.
- The customer opens a Mobile SDK app.
- An authentication prompt appears.
- The customer enters a username and password.
- The app sends the customer’s credentials to Salesforce and, in return, receives a session ID as confirmation of successful authentication.
- The customer approves the app’s request to grant access to the app.
- The app starts.
- The customer opens a mobile app.
- If the session ID is active, the app starts immediately. If the session ID is stale, the app uses the refresh token from its initial authorization to get an updated session ID.
- The app starts.
PIN protection is a function of the mobile policy and is used only when it’s enabled in the Salesforce connected app definition. See About PIN Security.