A simple utility to perform single sign on in a Titanium Alloy app using Google's Account Manager on android.
NOTE This module will soon be deprecated in favour of titanium_google_plus
In the meantime, you can use the module like the following:
var GoogleAuthUtil = require("com.sitata.googleauthutil");
GoogleAuthUtil.setScope("oauth2:profile email");
// this launches a dialog window for google account selection
GoogleAuthUtil.pickUserAccount(function(result) {
if (result.token && result.email) {
// returns the email and token which can be used for further queries against the
// google api
sendDataToServer({provider: 'google', email: result.email, code: result.token});
} else {
handleBadPost();
}
});