1 2 3 4 5 6 7 8 9 10 11 12 13 14
sdk.auth = (function(){ var auth = {} // integrate keychain/cordova.file.externalRootDirectory api auth.set_user = function(access_token, api_key){ // persist user data } auth.get_user = function(cb){ // fetch user data } return auth })()