Can I use an external library in cloud script? If not, what predefined objects are provided for me, such as the http object? I need to perform a HmacSHA256 hash and was hoping to use a premade one instead of defining my own.
Can I use an external library in cloud script? If not, what predefined objects are provided for me, such as the http object? I need to perform a HmacSHA256 hash and was hoping to use a premade one instead of defining my own.
For security reasons, we don't provide the ability to use modules/libraries in Cloud Script. Our Cloud Script engine is a vanilla instance of the latest V8 (https://v8.dev/), with the PlayFab Server API and a few key parameters pre-configured (https://api.playfab.com/docs/tutorials/landing-automation/writing-custom-cloud-script).
So, for any crypto, you'd want to just include that code directly in your script, since CryptoJS (for instance) isn't part of the base of V8.
Thank you for the fast reply. I figured as much. Are there any plans to extend the functionality of Cloud Script? Maybe to a Nodejs instance?
Actually, the plan is to improve scripting by adding an integration to use Azure Functions. We should have more we can talk about in that space in the coming quarter.
Good to hear! I haven't played with Azure Functions yet but if it is anything like AWS Lambda then It will be a great solution.
3 People are following this question.