+ Start a Discussion

Website login using SalesForce API to query the leads



I manage a website that has a restricted area where you need to sign-in to get the access to download some files.

I would like to use the Leads (SalesForce Object) to store the users that can access this area. So basically, in PHP i would query the salesforce database each time a user would log in, to check his password and email. If this query finds a user, then it would create a session for this private area.

The reason i would use the SalesForce Database instead of a mysql on localhost is to avoid duplication of data (on our website and on SalesForce, because these leads are also our users). So the website's authentication would rely on the SalesForce service to work.


But i tryied a small test (Query sample) and when i benchmark (with ab command) i get like 0.94 req/seconds, which is a bit slow for us (at least 5 time slower that our current login page).


Right now our login page is accessed about 700 times per day. So i'm wondering if it's a good practice to rely on SalesForce for this kind of feature on a website using the PHP toolkit? Is there a limit of queries that one site can do to the SalesForce API on a daily basis? Is this kind of usage of the SalesForce API is even allowed?


Thanks in advance. 


Edit: Added some clarifications 

Message Edited by jdesrosiers on 01-13-2010 01:48 PM
Best Answer chosen by Admin (Salesforce Developers) 

I do not think that you could use the leads object to store what you are looking for. you could use their email as the match on the leads table, but there is no password field that can be created. I mean I guess you could create a custom field in Salesforce to store their passwords, but it would not be encrypted what so ever and pass their login information to salesforce to check the details, then if they match, create a session


Not sure if that will help, but I tried....