4 ms·
Looks awesome, quick question, is it possible to mutate data from a javascript client? In the API reference, all I see for javascript are event listeners. Also,
by gmaster1440 14y ago
Looks awesome, quick question, is it possible to mutate data from a javascript client? In the API reference, all I see for javascript are event listeners. Also, how would a javascript client receive an access token? https://auth.simperium.com/ https://auth.simperium.com/ does not allow cross origin requests.
- ecksor 14y agoYes definitely, you can update directly using the bucket.update() method, and pass in an id and the data object. The better way would be to implement the 'local' callback to return the data, then just call bucket.update(id), and the library will call your 'local' method to retrieve the current state for that id. You can read about the 'local' callback here: https://simperium.com/docs/reference/js/#local https://simperium.com/docs/reference/js/#local For auth, we'll be adding cross-origin support for https://auth.simperium.com https://auth.simperium.com, up till now we've been focused on supporting apps with existing backends which generally use the HTTP API to generate auth tokens from their server.
- gmaster1440 14y agoperfect, thanks!
- ecksor 14y agoWe just added support for CORS on both /authorize/ and /create/, let us know if you have any issues
- gmaster1440 14y agosweet, will do