Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions supabase/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def _get_auth_headers(
"Authorization": authorization,
}

def _listen_to_auth_events(
async def _listen_to_auth_events(
self, event: AuthChangeEvent, session: Union[Session, None]
):
access_token = self.supabase_key
Expand All @@ -297,8 +297,8 @@ def _listen_to_auth_events(

self.options.headers["Authorization"] = self._create_auth_header(access_token)

# set_auth is a coroutine, how to handle this?
self.realtime.set_auth(access_token)
# Await for the realtime client to set the auth token
await self.realtime.set_auth(access_token)


async def create_client(
Expand Down
6 changes: 3 additions & 3 deletions supabase/_sync/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def _get_auth_headers(
"Authorization": authorization,
}

def _listen_to_auth_events(
async def _listen_to_auth_events(
self, event: AuthChangeEvent, session: Union[Session, None]
):
access_token = self.supabase_key
Expand All @@ -297,8 +297,8 @@ def _listen_to_auth_events(

self.options.headers["Authorization"] = self._create_auth_header(access_token)

# set_auth is a coroutine, how to handle this?
self.realtime.set_auth(access_token)
# Await for the realtime client to set the auth token
await self.realtime.set_auth(access_token)


def create_client(
Expand Down