File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ def __init__(
69
69
70
70
self .supabase_url = supabase_url
71
71
self .supabase_key = supabase_key
72
- self .options = copy .deepcopy (options )
73
- self .options .headers . update (self ._get_auth_headers ())
72
+ self .options = copy .copy (options )
73
+ self .options .headers = copy . copy (self ._get_auth_headers ())
74
74
75
75
self .rest_url = f"{ supabase_url } /rest/v1"
76
76
self .realtime_url = f"{ supabase_url } /realtime/v1" .replace ("http" , "ws" )
@@ -303,9 +303,7 @@ def _listen_to_auth_events(
303
303
self ._storage = None
304
304
self ._functions = None
305
305
access_token = session .access_token if session else self .supabase_key
306
- auth_header = copy .deepcopy (self ._create_auth_header (access_token ))
307
- self .options .headers ["Authorization" ] = auth_header
308
- self .auth ._headers ["Authorization" ] = auth_header
306
+ self .options .headers ["Authorization" ] = self ._create_auth_header (access_token )
309
307
asyncio .create_task (self .realtime .set_auth (access_token ))
310
308
311
309
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ def __init__(
68
68
69
69
self .supabase_url = supabase_url
70
70
self .supabase_key = supabase_key
71
- self .options = copy .deepcopy (options )
72
- self .options .headers . update (self ._get_auth_headers ())
71
+ self .options = copy .copy (options )
72
+ self .options .headers = copy . copy (self ._get_auth_headers ())
73
73
74
74
self .rest_url = f"{ supabase_url } /rest/v1"
75
75
self .realtime_url = f"{ supabase_url } /realtime/v1" .replace ("http" , "ws" )
@@ -302,9 +302,7 @@ def _listen_to_auth_events(
302
302
self ._storage = None
303
303
self ._functions = None
304
304
access_token = session .access_token if session else self .supabase_key
305
- auth_header = copy .deepcopy (self ._create_auth_header (access_token ))
306
-
307
- self .options .headers ["Authorization" ] = auth_header
305
+ self .options .headers ["Authorization" ] = self ._create_auth_header (access_token )
308
306
309
307
310
308
def create_client (
You can’t perform that action at this time.
0 commit comments