stackmob-js-0.9.2.js
function() {
      var oauth_accessToken = StackMob.Storage.retrieve('oauth2.accessToken');
      var oauth_macKey = StackMob.Storage.retrieve('oauth2.macKey');
      var oauth_expires = StackMob.Storage.retrieve('oauth2.expires');
      var oauth_refreshToken = StackMob.Storage.retrieve(StackMob.REFRESH_TOKEN_KEY);
      var userSchemaInfo = StackMob.Storage.retrieve('oauth2.userSchemaInfo');
      var oauth_schema = null;

      try {
        oauth_schema = JSON.parse(userSchemaInfo);
      } catch (e) { /* Harmless if this fails (in theory!)*/ }

      if (_.every([oauth_accessToken, oauth_macKey, oauth_expires, oauth_refreshToken, oauth_schema])) {
        var creds = {
          'oauth2.accessToken' : oauth_accessToken,
          'oauth2.macKey' : oauth_macKey,
          'oauth2.expires' : oauth_expires,
          'oauth2.userSchemaInfo' : oauth_schema
        };
        creds[StackMob.REFRESH_TOKEN_KEY] = oauth_refreshToken;

        return creds;
      } else {
        return {};
      }

    }
function() {
      var oauth_accessToken = StackMob.Storage.retrieve('oauth2.accessToken');
      var oauth_macKey = StackMob.Storage.retrieve('oauth2.macKey');
      var oauth_expires = StackMob.Storage.retrieve('oauth2.expires');
      var oauth_refreshToken = StackMob.Storage.retrieve(StackMob.REFRESH_TOKEN_KEY);
      var userSchemaInfo = StackMob.Storage.retrieve('oauth2.userSchemaInfo');
      var oauth_schema = null;

      try {
        oauth_schema = JSON.parse(userSchemaInfo);
      } catch (e) { /* Harmless if this fails (in theory!)*/ }

      if (_.every([oauth_accessToken, oauth_macKey, oauth_expires, oauth_refreshToken, oauth_schema])) {
        var creds = {
          'oauth2.accessToken' : oauth_accessToken,
          'oauth2.macKey' : oauth_macKey,
          'oauth2.expires' : oauth_expires,
          'oauth2.userSchemaInfo' : oauth_schema
        };
        creds[StackMob.REFRESH_TOKEN_KEY] = oauth_refreshToken;

        return creds;
      } else {
        return {};
      }

    }
function ( ) { var oauth_accessToken = StackMob . Storage . retrieve ( 'oauth2.accessToken' ) ; var oauth_macKey = StackMob . Storage . retrieve ( 'oauth2.macKey' ) ; var oauth_expires = StackMob . Storage . retrieve ( 'oauth2.expires' ) ; var oauth_refreshToken = StackMob . Storage . retrieve ( StackMob . REFRESH_TOKEN_KEY ) ; var userSchemaInfo = StackMob . Storage . retrieve ( 'oauth2.userSchemaInfo' ) ; var oauth_schema = null ; try { oauth_schema = JSON . parse ( userSchemaInfo ) ; } catch ( e ) { /* Harmless if this fails (in theory!)*/ } if ( _ . every ( [ oauth_accessToken , oauth_macKey , oauth_expires , oauth_refreshToken , oauth_schema ] ) ) { var creds = { 'oauth2.accessToken' : oauth_accessToken , 'oauth2.macKey' : oauth_macKey , 'oauth2.expires' : oauth_expires , 'oauth2.userSchemaInfo' : oauth_schema } ; creds [ StackMob . REFRESH_TOKEN_KEY ] = oauth_refreshToken ; return creds ; } else { return { } ; } }
Retrieve the OAuth 2.0 credentials from client storage.
Retrieve the OAuth 2 . 0 credentials from client storage .