1

I have two connected apps in my developer org. One is for Android and other for iOS devices. What I want to know is why a user can have multiple login sessions in different devices (or same). Is there a way to not allow a user to login? For example in a Android device and then in a iOS device via connected app?

Another question. Everytime I login on my device app, SF always shows me the permissions page to Allow / Deny the app. Why does this happen? Is it because I didn't publish my connected app yet?

2 Answers 2

3

In answer to your first question - you can control access to connected apps via profiles and permission sets. Go to Your Name | Manage Apps | Connected Apps and click on an app. From here you can change Permitted Users to Admin-approved Users, and add a permission set to each app. Now you can add users to the relevant permission set.

Salesforce shows the permissions page when you request OAuth authorization (user-agent flow). Your app should request a refresh token and save that (securely!) on the device. When your app starts it should check for the presence of a refresh token and use the token refresh flow to obtain a new access token, rather than the user-agent flow.

0
  1. Given user can be logged from up to 4 sources (browsers/apps) at same time, so I don't see any easy way to block user for logging from 2 apps at same time.

  2. Are you storing access token in apps? Remember that to be able to obtain token you need access code (which actually is short lived token).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .