Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can my app (an iframe loaded by salesforce) confirm that the user is logged in to salesforce?

We're building a salesforce app, and I need to auth against a user's SF user (so they don't have to log in to SF, then also log into our system).

So I from our app, I want to bounce off of SF and: 1) confirm that the user is logged in to salesforce. 2) get (or confirm, if I provide it) some kind of tenant id, so I can confirm that they are logged in to the tenant they are self-reporting to me.

Does SF have docs on this flow somewhere?

Thanks!

like image 305
chrispitzer Avatar asked Dec 17 '25 17:12

chrispitzer


1 Answers

When you put your iframe in Salesforce you can include the current SessionId and ServerURL in the query string parameters.

You can then use the PartnerAPI with these credentials to call back to Salesforce and verify the users details.

There are some very basic details on doing this in Implementing Salesforce Integrations on Force.com

like image 160
Daniel Ballinger Avatar answered Dec 19 '25 21:12

Daniel Ballinger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!