parse 4.2.0-alpha.3 → 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 +38 -3
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +38 -3
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseUser.js +36 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseUser.js +34 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseUser.js +22 -1
- 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
|
|
@@ -533,7 +533,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
|
|
|
533
533
|
SERVER_AUTH_TOKEN: null,
|
|
534
534
|
LIVEQUERY_SERVER_URL: null,
|
|
535
535
|
ENCRYPTED_KEY: null,
|
|
536
|
-
VERSION: 'js' + "4.2.0-alpha.
|
|
536
|
+
VERSION: 'js' + "4.2.0-alpha.4",
|
|
537
537
|
APPLICATION_ID: null,
|
|
538
538
|
JAVASCRIPT_KEY: null,
|
|
539
539
|
MASTER_KEY: null,
|
|
@@ -15822,6 +15822,40 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
|
|
|
15822
15822
|
return user.logIn(options);
|
|
15823
15823
|
}
|
|
15824
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
|
+
|
|
15825
15859
|
/**
|
|
15826
15860
|
* Logs in a user with an objectId. On success, this saves the session
|
|
15827
15861
|
* to disk, so you can retrieve the currently logged in user using
|
|
@@ -16271,7 +16305,8 @@ var DefaultController = {
|
|
|
16271
16305
|
var stateController = _CoreManager.default.getObjectStateController();
|
|
16272
16306
|
var auth = {
|
|
16273
16307
|
username: user.get('username'),
|
|
16274
|
-
password: user.get('password')
|
|
16308
|
+
password: user.get('password'),
|
|
16309
|
+
authData: user.get('authData')
|
|
16275
16310
|
};
|
|
16276
16311
|
return RESTController.request(options.usePost ? 'POST' : 'GET', 'login', auth, options).then(function (response) {
|
|
16277
16312
|
user._migrateId(response.objectId);
|