diff --git a/modules/bp/pages/login.py b/modules/bp/pages/login.py index 92e3c1cd213737cabe6109d2210f0069ee8f8a04..2ffb136b80ee1e66fda107cd50e635e2771b5972 100644 --- a/modules/bp/pages/login.py +++ b/modules/bp/pages/login.py @@ -163,7 +163,11 @@ def get_auth_method(self): status_message = CleanText('//div[@class="textFCK"]')(self.doc) if 'Une authentification forte via Certicode Plus vous' in status_message: return 'cer+' - elif 'authentification forte via Certicode vous' in status_message: + elif re.search( + 'authentification forte via Certicode vous' + + '|code de sécurité que vous recevrez par SMS', + status_message + ): return 'cer' elif re.search( 'avez pas de solution d’authentification forte' @@ -189,7 +193,7 @@ def get_auth_method(self): ) else: # raise an error to avoid silencing other no2fa cases - raise AssertionError('no2fa wrongly not skipped') + raise AssertionError("No 2FA case to skip, or new 2FA case to trigger") raise AssertionError('Unhandled login message: "%s"' % status_message) def get_skip_url(self):