Skip to content

Commit d9eb91f

Browse files
committed
tests
1 parent bb1ed0f commit d9eb91f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/RestWrite.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,15 @@ RestWrite.prototype.createSessionTokenIfNeeded = async function () {
891891
if (this.auth.user && this.data.authData) {
892892
return;
893893
}
894+
if (
895+
!this.storage.authProvider && // signup call, with
896+
this.config.preventLoginWithUnverifiedEmail && // no login without verification
897+
this.config.verifyUserEmails
898+
) {
899+
// verification is on
900+
this.storage.rejectSignup = true;
901+
return;
902+
}
894903
if (!this.storage.authProvider && this.config.verifyUserEmails) {
895904
let shouldPreventUnverifedLogin = this.config.preventLoginWithUnverifiedEmail;
896905
if (typeof this.config.preventLoginWithUnverifiedEmail === 'function') {
@@ -909,15 +918,6 @@ RestWrite.prototype.createSessionTokenIfNeeded = async function () {
909918
return;
910919
}
911920
}
912-
if (
913-
!this.storage.authProvider && // signup call, with
914-
this.config.preventLoginWithUnverifiedEmail && // no login without verification
915-
this.config.verifyUserEmails
916-
) {
917-
// verification is on
918-
this.storage.rejectSignup = true;
919-
return;
920-
}
921921
return this.createSessionToken();
922922
};
923923

0 commit comments

Comments
 (0)