parse 4.2.0-alpha.2 → 4.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +41 -3
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +41 -3
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/Cloud.js +3 -0
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseUser.js +36 -1
- package/lib/node/Cloud.js +3 -0
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseUser.js +34 -1
- package/lib/react-native/Cloud.js +3 -0
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseUser.js +22 -1
- package/lib/weapp/Cloud.js +3 -0
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseUser.js +36 -1
- package/package.json +1 -1
package/dist/parse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v4.2.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v4.2.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -264,6 +264,9 @@ function run(name /*: string*/, data /*: mixed*/, options /*: RequestOptions*/)
|
|
|
264
264
|
if (options.sessionToken) {
|
|
265
265
|
requestOptions.sessionToken = options.sessionToken;
|
|
266
266
|
}
|
|
267
|
+
if (options.installationId) {
|
|
268
|
+
requestOptions.installationId = options.installationId;
|
|
269
|
+
}
|
|
267
270
|
if (options.context && (0, _typeof2.default)(options.context) === 'object') {
|
|
268
271
|
requestOptions.context = options.context;
|
|
269
272
|
}
|
|
@@ -530,7 +533,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
530
533
|
SERVER_AUTH_TOKEN: null,
|
|
531
534
|
LIVEQUERY_SERVER_URL: null,
|
|
532
535
|
ENCRYPTED_KEY: null,
|
|
533
|
-
VERSION: 'js' + "4.2.0-alpha.
|
|
536
|
+
VERSION: 'js' + "4.2.0-alpha.4",
|
|
534
537
|
APPLICATION_ID: null,
|
|
535
538
|
JAVASCRIPT_KEY: null,
|
|
536
539
|
MASTER_KEY: null,
|
|
@@ -15819,6 +15822,40 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15819
15822
|
return user.logIn(options);
|
|
15820
15823
|
}
|
|
15821
15824
|
|
|
15825
|
+
/**
|
|
15826
|
+
* Logs in a user with a username (or email) and password, and authData. On success, this
|
|
15827
|
+
* saves the session to disk, so you can retrieve the currently logged in
|
|
15828
|
+
* user using <code>current</code>.
|
|
15829
|
+
*
|
|
15830
|
+
* @param {string} username The username (or email) to log in with.
|
|
15831
|
+
* @param {string} password The password to log in with.
|
|
15832
|
+
* @param {object} authData The authData to log in with.
|
|
15833
|
+
* @param {object} options
|
|
15834
|
+
* @static
|
|
15835
|
+
* @returns {Promise} A promise that is fulfilled with the user when
|
|
15836
|
+
* the login completes.
|
|
15837
|
+
*/
|
|
15838
|
+
}, {
|
|
15839
|
+
key: "logInWithAdditionalAuth",
|
|
15840
|
+
value: function (username /*: string*/, password /*: string*/, authData /*: AuthData*/, options /*:: ?: FullOptions*/) {
|
|
15841
|
+
if (typeof username !== 'string') {
|
|
15842
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Username must be a string.'));
|
|
15843
|
+
}
|
|
15844
|
+
if (typeof password !== 'string') {
|
|
15845
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
|
|
15846
|
+
}
|
|
15847
|
+
if (Object.prototype.toString.call(authData) !== '[object Object]') {
|
|
15848
|
+
return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Auth must be an object.'));
|
|
15849
|
+
}
|
|
15850
|
+
var user = new this();
|
|
15851
|
+
user._finishFetch({
|
|
15852
|
+
username: username,
|
|
15853
|
+
password: password,
|
|
15854
|
+
authData: authData
|
|
15855
|
+
});
|
|
15856
|
+
return user.logIn(options);
|
|
15857
|
+
}
|
|
15858
|
+
|
|
15822
15859
|
/**
|
|
15823
15860
|
* Logs in a user with an objectId. On success, this saves the session
|
|
15824
15861
|
* to disk, so you can retrieve the currently logged in user using
|
|
@@ -16268,7 +16305,8 @@ var DefaultController = {
|
|
|
16268
16305
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
16269
16306
|
var auth = {
|
|
16270
16307
|
username: user.get('username'),
|
|
16271
|
-
password: user.get('password')
|
|
16308
|
+
password: user.get('password'),
|
|
16309
|
+
authData: user.get('authData')
|
|
16272
16310
|
};
|
|
16273
16311
|
return RESTController.request(options.usePost ? 'POST' : 'GET', 'login', auth, options).then(function (response) {
|
|
16274
16312
|
user._migrateId(response.objectId);
|