Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building an application in PHP and MySql that will allow people to sign in with their Salesforce ID, Password and Token and then they will receive a report based on their contacts and opportunities. Are there any extra security measures that I should take to save them in a mysql database? Thanks!

share|improve this question
up vote 8 down vote accepted

You should do an OAuth login flow and store the refresh_token rather than storing raw credentials. Encrypting the value and managing the key outside of the db would help increase security as well.

Also, presumably you're planning to send them this report on a regular basis? otherwise there's no need to store the credentials or token at all.

share|improve this answer
I have to read more about Oauth, but if they login using OAuth, can I get objects and data? – raygo Feb 11 '14 at 21:27
Yes, as part of the oauth setup you can say you want API access and then the resulting access token will give you API access. – superfell Feb 11 '14 at 21:33
Awesome! Thanks! – raygo Feb 11 '14 at 21:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.