+ Start a Discussion
sunny.sfdcsunny.sfdc 

How do third party apps login to salesforce?

Hi 

I want to implement authenticate mechanism just like one in workbench,salesforce for outlook or any other third party app. I want to implement like this:

1. A standalone application in java with a login screen.
2. When salesforce username and password are filled, it should display a page for allow/deny the access to salesforce.
3. User clicks on allow and then user is taken to my application's home page.

Basically I dont want to use anything other than salesforce username and password to login and make api calls to salesforce.

Please let me know how can I achieve the above mentioned as I am not able to figure out anything from numerous articles on net describing OAuth, SSO etc.

Regards
Sunny
Shruti SShruti S
Applications like Workbench uses OAuth 2.0 for their login. Take a look at this link which explains in detail about OAuth - https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com .

I am not an expert in Java, but I can help you setting up OAuth. If you have any doubts feel free to let me know.
sunny.sfdcsunny.sfdc
Hi Shruti

Thanks for response. I have read this link. My only confusion is that it mentions that we need to have client secret and client id. For this we need to create a connected app as well. But we dont have to do these steps while logging into workbench for any salesforce instance.

I just want to find out the mechanism by which by providing salesforce username and password only I should be able to login into my application. Or is there anything I am missing.

TIA
Shruti SShruti S
Well, you probably got it wrong. Salesforce will definitely have a Connected App created in one of their Salesforce Org. It is that Connected App's Client Secret/Client Id that is utilized when we do an OAuth while logging into Workbench.