[SalesForce] Guest User cannot access @AuraEnabled Apex Controller

I created a force.com Site, which uses a LWC in Visualforce page. It seems that the Guest User cannot read the records and even if I preview as admin the Site still the records are not showing. Guest User has access to the objects, the visualforce page and the Apex class controller. Is there any permission I need to add? TIA.

Best Answer

There is a critical update called "Restrict Access to @AuraEnabled Apex Methods for Guest and Portal Users Based on User Profile".If you have this critical update enabled in your org then the guest users will not be able to access the @AuraEnabled apex classes unless you give the access on profile level.

Please refer the release notes to see the same for more information.

Related Topic