diff --git a/src/linkahead/connection/authentication/interface.py b/src/linkahead/connection/authentication/interface.py index b48e27c08312bf1358d32a9a1203627a9d0007c2..f5033fad6405a94a7b16a6743ff60c360dd611d2 100644 --- a/src/linkahead/connection/authentication/interface.py +++ b/src/linkahead/connection/authentication/interface.py @@ -125,8 +125,9 @@ class AbstractAuthenticator(ABC): Returns ------- """ - self.auth_token = parse_auth_token( - response.getheader("Set-Cookie")) + new_token = parse_auth_token(response.getheader("Set-Cookie")) + if new_token is not None: + self.auth_token = new_token def on_request(self, method: str, path: str, headers: QueryDict, **kwargs): # pylint: disable=unused-argument