Skip to content

Commit

Permalink
[ENG-6551] Reset credentials during oauth flow (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
adlius authored Nov 22, 2024
1 parent e9af0f7 commit b74b17f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions addon_service/authorized_account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion addon_service/authorized_account/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit b74b17f

Please sign in to comment.