james_bond
james_bond

Reputation: 6906

Oauth refresh token salesforce process simplification

I'm currently developing an application that essentially perform background fetch of reports from a salesforce account and save them into a db, the flow goes more or less like this:

-A user logs-in in my app. -Selects add salesforce connection. -He is presented with a form to provide consumer key (client_id in some docs) and consumer_secret as shown in Develop-Remote Access (in a salesforce account). -Then the app initiates web server flow as described here and the salesforce login form is presented so user can authorize my app, app get access token, then request refresh token. -Once the app goes through all this process it obtaines the refresh token to update the access token once it expires so it can make subsequent call to API functions. Once the refresh token is get, the user doesn't have to go through all the flow, just log-in to my app and see his data updated.

This refresh token is obtained to perform updates of reports even when the user is not logged into the system.

However, before doing all that user has to go to the Develop - Remote Access section to get consumer and secret and provide it to the app. Average user don't get this easily, is there any way to simplify this? Any experience on how to simplify the process, am I looking at the wrong flow? Btw I'm working with java.

Thanks.

Upvotes: 0

Views: 982

Answers (1)

superfell
superfell

Reputation: 19040

You can create one remote access setting in your own developer org and then re-use that, it's automatically shared, you don't need to have your customers create their own ones.

Upvotes: 1

Related Questions