Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__ACCESSTOKEN__ is not private #66

Closed
tuanlam1610 opened this issue Nov 23, 2023 · 1 comment
Closed

__ACCESSTOKEN__ is not private #66

tuanlam1610 opened this issue Nov 23, 2023 · 1 comment

Comments

@tuanlam1610
Copy link

Hi guys, I base on this project to mount my react app directly inside of the VF page. But the problem is that I need to add the

    <script type="text/javascript">
            const __ACCESSTOKEN__ = '{!$Api.Session_ID}';
     </script>

If I put the __ACCESSTOKEN here, my app will not pass the security check to public my package to AppExchange. Do you have any solutions for it? Thanks for your help.

@ChuckJonas
Copy link
Owner

The access token is required to call the REST API from the client-side.

You could possibly wrap this in an Apex Controller method, but that would only maybe serve to "hide" the underlying implementation from the security review. At the end of the day, if Salesforce says you're not allowed to use client side API access in AppExchange packages, then you need to come up with some other way to communicate with Salesforce.

In that case your option are:

Also... I'm by no means an expert in AppExchange package development, but my understanding was that Salesforce wouldn't pass anything other than their "officially supported" framework (LWC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants