In various posts and articles I’ve been exploring uses of the Google Apps scriptDB datastore. One of the things I’ve been mulling over is how to simplify the whole oAuth experience when dealing with REST queries that need authentication.
For those of us that do not have server based development environments, Google Apps Script comes to the rescue.
- Google Apps ScriptDB gives the opportunity to securely store data that can be shared amongst scripts, yet kept private to those without access.
- Urlfetch.oauthConfig() deals with the “mess with your head” business of oAuth
- The ContentService is able to generate REST like responses.
- Only scripts that are authorized to use your library can have access to your scriptDB as the only way they can find out the db() is through myStuff.myStuffDb()
- mcpher.getMyStuff() has an additional security check that only allows the creator of the entry to access it.