* Tweaks test in order to show the error

- Session is effectively created when it should not

* Do not create a session when users need verified accounts on signup
This commit is contained in:
Florent Vilmart
2017-09-11 11:07:39 -04:00
committed by GitHub
parent 839a117246
commit a660a0c25f
2 changed files with 9 additions and 1 deletions

View File

@@ -548,6 +548,11 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() {
if (this.query) {
return;
}
if (!this.storage['authProvider'] // signup call, with
&& this.config.preventLoginWithUnverifiedEmail // no login without verification
&& this.config.verifyUserEmails) { // verification is on
return; // do not create the session token in that case!
}
return this.createSessionToken();
}