Skip to content

Commit 1d727ad

Browse files
authored
Merge pull request #19810 from mozilla/device-login-email-premature
fix(auth): device login email sent at same time as verify login email
2 parents b1d27cc + 78318f3 commit 1d727ad

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/fxa-auth-server/lib/routes/account.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,11 +1267,14 @@ export class AccountHandler {
12671267
// If the request wants keys , user *must* confirm their login session before they can actually
12681268
// use it. Otherwise, they don't *have* to verify their session. All sessions are created
12691269
// unverified because it prevents them from being used for sync.
1270+
// Also require verification if the service is in the servicesWithEmailVerification list.
12701271
let mustVerifySession =
12711272
needsVerificationId &&
12721273
(verificationForced === 'suspect' ||
12731274
verificationForced === 'global' ||
1274-
requestHelper.wantsKeys(request));
1275+
requestHelper.wantsKeys(request) ||
1276+
(service &&
1277+
this.config.servicesWithEmailVerification.includes(service)));
12751278

12761279
// For accounts with TOTP, we always force verifying a session.
12771280
if (verificationMethod === 'totp-2fa') {

0 commit comments

Comments
 (0)