0

With Named Credentials, do I in fact have the ability to make callouts to external systems which do not require autentication? If that is the case, why should I ever use remote sites?

enter image description here

  • Because they are less work to configure? – Adrian Larson Nov 22 '17 at 19:27
  • Hey @AdrianLarson, I'm new to named credentials, so is it just a couple of clicks that you save? Also, what you save in those clicks, don't you gain in future proofing? – PartOfTheOhana Nov 22 '17 at 19:31
  • It's not any more future proof. That's not what Named Credentials were designed for, though you can use them that way. – Adrian Larson Nov 22 '17 at 19:34
2

Remote Sites are also used for the AJAX Proxy, which lets you get around CORS (Cross-Origin Resource Sharing) security limitations in your browser. While you could use a Named Credential for this purpose (e.g. call a @RemoteAction method or webservice method), the AJAX Proxy can handle large (unlimited?) uploads and downloads, unlike the various limitations that plague the other APIs (1MB, 6MB, 12MB, 15MB are some of the limits you'll encounter using other mechanisms). So there's at least one legitimate case where you'd use a Remote Site. While I do agree that you should consider Named Credentials when possible, there are some practical times when it makes more sense to use a Remote Site and the AJAX Proxy instead.

  • Another typical example is when the user will provide the credentials to log in to the website/service specified in the RSS – Sebastian Kessel Nov 22 '17 at 21:31
  • @SebastianKessel - can you elaborate on your use case, and when the user would provide thier credentials? – PartOfTheOhana Nov 22 '17 at 22:26
  • The typical example is a situation where the user has his own credentials to an external system and every user will have to authenticate individually. This is very common in managed packages. – Sebastian Kessel Nov 23 '17 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.