You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This sets the given fields of an account, if it is different from the current value – except for the email address, which we only set but not change
@@ -315,11 +316,12 @@ export class PassportLogin {
315
316
// user authenticated, passport not known, adding to the user's account
316
317
awaitthis.createPassport(opts,locals);
317
318
}else{
319
+
L(`passport_account_id=${passport_account_id}`);
318
320
if(
319
321
locals.has_valid_remember_me&&
320
322
locals.account_id!==passport_account_id
321
323
){
322
-
L("passport exists but is associated with another account already");
324
+
L("passport exists, but is associated with another account already");
323
325
throwError(
324
326
`Your ${opts.strategyName} account is already attached to another CoCalc account. First sign into that account and unlink ${opts.strategyName} in account settings, if you want to instead associate it with this account.`,
// There is no account with the new email address, hence we can update the email address as well
516
-
upd.email_address=locals.email_address;
517
-
L(
518
-
`No existing account with email address ${locals.email_address} provided by the SSO strategy. Hence we change the email address of account ${locals.account_id} as well.`,
519
-
);
520
-
}
515
+
upd.email_address=locals.email_address;
521
516
}
522
517
523
518
L(`account exists and we update name of user based on SSO`);
0 commit comments