1

I have two pages in Community that has each lightning component. I'm trying to figure out the best practice for passing secure information between the two pages. 

Essentially, I have a lightning:button in myFirstComponent and it has an information like "Tax ID" to be passed on to the 2nd component. When clicked the button, it will call the Page 2 and display the information for the Tax Id. Now, the Tax ID is not something we'd like to expose in the URL as parameters for security reasons. Any advice on best practice on how to achieve this?

Community: Page1 <c:myFirstComponent />

Page2 <c:mySecondComponent />   

1 Answer 1

0

Use objects in Salesforce to store them securely on Salesforce servers.

  1. Page 1 action to navigate, first makes a DML to securely store tax data in an object and then takes you to a second page with the URL parameter as ID of the new tax record that was inserted.

  2. Page 2 retrieves the data from the object using SOQL, reading the Id from the URL, and then renders tax information.

This way you avoid having to pass something that you think is not secure via the URL parameter.

Also, another disadvantage of having some sensitive info on the URL is users can easily manipulate that data before it is stored in the database.

You must log in to answer this question.

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