diff --git a/spec/ParseUser.spec.js b/spec/ParseUser.spec.js index 0e5f3a78ee..424e4207f0 100644 --- a/spec/ParseUser.spec.js +++ b/spec/ParseUser.spec.js @@ -1720,7 +1720,17 @@ describe('Parse.User testing', () => { expect(e.code).toEqual(Parse.Error.SESSION_MISSING); done(); }); - }) + }); + + it('support user/password signup with empty authData block', (done) => { + // The android SDK can send an empty authData object along with username and password. + Parse.User.signUp('artof', 'thedeal', { authData: {} }).then((user) => { + done(); + }, (error) => { + fail('Signup should have succeeded.'); + done(); + }); + }); }); diff --git a/src/RestWrite.js b/src/RestWrite.js index d23912a775..c5551e7e63 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -176,7 +176,7 @@ RestWrite.prototype.validateAuthData = function() { } } - if (!this.data.authData) { + if (!this.data.authData || !Object.keys(this.data.authData).length) { return; }