Closed bmxmaga closed 7 years ago
yep, this is for node development. the websdk for front-end implementation: http://developers.gigya.com/display/GD/Web+SDK
This SDK requires sensitive information (your secret key) to function, so it can't be used on the client-side. Regardless, it implements APIs only (no UIs).
Hi, I wanted to use gigya on client side in Angular project. I didn't find the
accounts.showScreenSet()
method so I just referred to theGigya.request('accounts.showScreenSet', {...})
. But what I get is this error:EXCEPTION: Uncaught (in promise): TypeError: fs.readFileSync is not a function TypeError: fs.readFileSync is not a function at getCertificate (http://localhost:4200/vendor.bundle.js:133782:26) at http://localhost:4200/vendor.bundle.js:133795:17 at new ZoneAwarePromise (http://localhost:4200/polyfills.bundle.js:745:29) at Gigya.exports.httpRequest (http://localhost:4200/vendor.bundle.js:133790:12) at Gigya. (http://localhost:4200/vendor.bundle.js:96419:51)
at step (http://localhost:4200/vendor.bundle.js:96286:23)
at Object.next (http://localhost:4200/vendor.bundle.js:96267:53)
at http://localhost:4200/vendor.bundle.js:96261:71
at new ZoneAwarePromise (http://localhost:4200/polyfills.bundle.js:745:29)
at __awaiter (http://localhost:4200/vendor.bundle.js:96257:12)
at Gigya._request (http://localhost:4200/vendor.bundle.js:96373:16)
at Gigya. (http://localhost:4200/vendor.bundle.js:96364:44)
at step (http://localhost:4200/vendor.bundle.js:96286:23)
at Object.next (http://localhost:4200/vendor.bundle.js:96267:53)
at http://localhost:4200/vendor.bundle.js:96261:71
I didn't try to investigate it but by the error message it's obvious that this lib is designed for node applications.
The question is: is it possible to configure it somehow for client application? Or maybe there is already some other package that I could use in a Angular application? Currently all I have is just the Gigya's SDK available via CDN.