File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,6 @@ export class UsersRouter extends ClassesRouter {
103
103
user = results [ 0 ] ;
104
104
}
105
105
106
- if ( req . config . verifyUserEmails && req . config . preventLoginWithUnverifiedEmail && ! user . emailVerified ) {
107
- throw new Parse . Error ( Parse . Error . EMAIL_NOT_FOUND , 'User email is not verified.' ) ;
108
- }
109
106
return passwordCrypto . compare ( password , user . password ) ;
110
107
} )
111
108
. then ( ( correct ) => {
@@ -117,7 +114,9 @@ export class UsersRouter extends ClassesRouter {
117
114
if ( ! isValidPassword ) {
118
115
throw new Parse . Error ( Parse . Error . OBJECT_NOT_FOUND , 'Invalid username/password.' ) ;
119
116
}
120
-
117
+ if ( req . config . verifyUserEmails && req . config . preventLoginWithUnverifiedEmail && ! user . emailVerified ) {
118
+ throw new Parse . Error ( Parse . Error . EMAIL_NOT_FOUND , 'User email is not verified.' ) ;
119
+ }
121
120
// handle password expiry policy
122
121
if ( req . config . passwordPolicy && req . config . passwordPolicy . maxPasswordAge ) {
123
122
let changedAt = user . _password_changed_at ;
You can’t perform that action at this time.
0 commit comments