Prevent linkWith sessionToken from generating new session (#5801)

This commit is contained in:
Diamond Lewis
2019-07-11 09:32:11 -05:00
committed by GitHub
parent 26943de778
commit bb06376a32
2 changed files with 24 additions and 0 deletions

View File

@@ -806,6 +806,10 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() {
if (this.query && !this.data.authData) {
return;
}
// Don't generate new sessionToken if linking via sessionToken
if (this.auth.user && this.data.authData) {
return;
}
if (
!this.storage['authProvider'] && // signup call, with
this.config.preventLoginWithUnverifiedEmail && // no login without verification