From 6c3ac04eefc9c111d4c806fa944a05da56af4ef1 Mon Sep 17 00:00:00 2001 From: Lukas Dobler <69309597+doluk@users.noreply.github.com> Date: Mon, 5 Dec 2022 10:03:59 +0100 Subject: [PATCH] Fix a bug for clients with realtime access The wrong scope prevented the key creation with email and password and force the users to login with keys --- coc/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coc/client.py b/coc/client.py index 2a8bc9ab..0e38eba9 100644 --- a/coc/client.py +++ b/coc/client.py @@ -190,6 +190,8 @@ def __init__( self.http = None # set in method login() self.realtime = realtime + if realtime and self.key_scopes == "clash": + self.key_scopes = 'clash:*:verifytoken,realtime' # without that the key creation will fail due to the wrong scopes. self.correct_tags = correct_tags self.load_game_data = load_game_data