From b74b17f4f2d0f9c4b71efdaa88dc4581175aaa0e Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Fri, 22 Nov 2024 09:17:38 -0500 Subject: [PATCH] [ENG-6551] Reset credentials during oauth flow (#159) --- addon_service/authorized_account/models.py | 2 ++ addon_service/authorized_account/serializers.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addon_service/authorized_account/models.py b/addon_service/authorized_account/models.py index 4cc0d863..0c944f68 100644 --- a/addon_service/authorized_account/models.py +++ b/addon_service/authorized_account/models.py @@ -255,6 +255,8 @@ def initiate_oauth2_flow(self, authorized_scopes=None): ), state_nonce=oauth2_utils.generate_state_nonce(), ) + # reset credentials + self._credentials = None self.save() def clean(self): diff --git a/addon_service/authorized_account/serializers.py b/addon_service/authorized_account/serializers.py index 99ff9b75..62e5e2d4 100644 --- a/addon_service/authorized_account/serializers.py +++ b/addon_service/authorized_account/serializers.py @@ -132,7 +132,6 @@ def process_and_set_auth( return authorized_account def update(self, instance, validated_data): - validated_data = self.fix_dotted_base_account(validated_data) # only these fields may be PATCHed: if "display_name" in validated_data: instance.display_name = validated_data["display_name"]