Crypto operations in JavaScript functions within platform instruction limits #373
Replies: 3 comments 3 replies
-
There are crypto libraries for JavaScript that do not depend on the browser |
Beta Was this translation helpful? Give feedback.
-
Renamed and moved to general improvements since this affects all APIs |
Beta Was this translation helpful? Give feedback.
-
@nickwesselman Any update on this feature? Our use case is similar: passing encrypted pricing data to a function via line item property. |
Beta Was this translation helpful? Give feedback.
-
Here's my usecase, each of my users have certain number of credits that are automatically applied as discounts during checkout flow if certain conditions are met. Since I can't fetch how many credits a user has from the function (since no api calls can be made), I was thinking I could put that data beforehand as a cart attribute in an encrypted format, decrypt it in my function and apply that as an order level discount.
But the documentation says 'crypto' is not available in functions. So, I am not quite sure how to decrypt on the function side anymore.
Any help is sincerely appreciated. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions