Is there an example using the wix api to send the contents of a form to a Google spreadsheet instead of the wix dataset collection? Or, an example of accessing any remote service where I might want to protect my login info. I know I can do this in node.js - how do I do it in wix?
Is there also a REST API for the OAUTH? if so, let’s continue with that…
In terms of security, I think that saving the key is not a Wix Code concern.
You should make some research about how it is done on a regular web apps.
Just some thoughts about it…
I don’t know enough about the implementation of OAUTH2, so I’m not even sure it’s a public/private key implementation. But if so, in my opinion, a private key should never be sent over the web… this means that it should be created on the reading side and stay there (that’s why I think It’ll be hard to find such REST API). With the private key, a public key should be created too, and is safe to be sent over the web.
That way, you create an asynchronous encryption which allows everyone to hold and use your public key for encryption, and allow only the private key holder to decrypt de data.
Jotform.com lets you send information from their forms to google spreadsheet. I found this trying to figure out how to integrate jotform’s or google spreadsheets with the wix database.