I'm building a Salesforce Lightning app, which will be made available in the Salesforce app exchange. But I'm just starting to learn the platform, so a few things are unclear to me. Can anyone help with the following?

  1. The app will connect to my company's Rest API, which currently uses username/password authentication. Is it possible to authenticate with our API in this way? I've seen some indication that Salesforce requires the use of OAuth, but I'm not sure. If we can authenticate with username/password, where can I store the resulting jwt token in Salesforce securly for reuse?

  2. Although we will build some UI components using Lightning web components (mostly static display), we also need to load our SaaS application in an iframe, when a user clicks on a CTA in the Lightning app. Is this possible?

Thanks for any help

  • Welcome to SFSE! Please take a moment to read How to Ask and take the tour. Your questions indicate that you haven't done enough work to prepare for this project. Recommended steps: reading documentation, going through Salesforce's online learning tool (Trailhead) and checking similar Q&As here.
    – identigral
    Jun 17, 2022 at 17:09
  • Quick answers: 1: Yes, it's possible. 2: Yes, it's possible
    – identigral
    Jun 17, 2022 at 17:12

1 Answer 1


As identigral mentioned, both are possible.

For the credentials, take a look at Named Credentials as they might be what you're looking for.

For the iframe, take a look at the Canvas framework.

This exact pattern of integration is quite common, and is exactly why we built Xkit. Our standard integration pattern includes connecting with your REST API for data sync as well as to enable actions, and we allow an action which displays an iframe from your application in a modal, all with just a few simple API calls.

I'm happy to talk you through it personally (I'm the founder), my email is trey@ our domain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .