fix login with a non-unique email where an account linked to another FC account already exists
This commit is contained in:
parent
3abded80f6
commit
a0bc944e84
|
@ -403,8 +403,11 @@ class LoginOrLinkView(PopupViewMixin, FcOAuthSessionViewMixin, View):
|
|||
token=self.token)
|
||||
else:
|
||||
self.logger.warning(u'account with email %s already linked to another sub '
|
||||
u'%s',
|
||||
u'%s, logging anyway',
|
||||
email, user.fc_accounts.values_list('sub', flat=True))
|
||||
# login the user anyway, but do not update its user_info, it's not ideal
|
||||
a2_utils.simulate_login(user, 'france-connect')
|
||||
return self.redirect(request)
|
||||
if user:
|
||||
a2_utils.login(request, user, 'france-connect')
|
||||
self.fc_account = models.FcAccount.objects.get(sub=self.sub, user=user)
|
||||
|
|
Reference in New Issue