diff options
| -rw-r--r-- | changes/better_support_login_multiple_providers | 3 | ||||
| -rw-r--r-- | src/leap/bitmask/crypto/srpauth.py | 9 | 
2 files changed, 12 insertions, 0 deletions
diff --git a/changes/better_support_login_multiple_providers b/changes/better_support_login_multiple_providers new file mode 100644 index 00000000..149471d9 --- /dev/null +++ b/changes/better_support_login_multiple_providers @@ -0,0 +1,3 @@ +  o Fixes a bug where you cannot login to a different provider once +    you logged in to another one. Fixes #3695. +  o Also resets the session for every login attempt. Related to #3695.
\ No newline at end of file diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py index 90d9ea0a..cbff4b49 100644 --- a/src/leap/bitmask/crypto/srpauth.py +++ b/src/leap/bitmask/crypto/srpauth.py @@ -508,6 +508,8 @@ class SRPAuth(QtCore.QObject):              self._username = username              self._password = password +            self._session = self._fetcher.session() +              d = threads.deferToThread(self._authentication_preprocessing,                                        username=username,                                        password=password) @@ -603,6 +605,13 @@ class SRPAuth(QtCore.QObject):          # Store instance reference as the only member in the handle          self.__dict__['_SRPAuth__instance'] = SRPAuth.__instance +        # Generally, we initialize this with a provider_config once, +        # and after that initialize it without one and use the one +        # that was assigned before. But we need to update it if we +        # want to be able to logout and login into another provider. +        if provider_config is not None: +            SRPAuth.__instance._provider_config = provider_config +      def authenticate(self, username, password):          """          Executes the whole authentication process for a user  | 
