supabase_auth 2.32.0__tar.gz → 2.33.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/PKG-INFO +1 -1
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/pyproject.toml +1 -1
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_client.py +5 -4
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_client.py +5 -4
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/errors.py +11 -5
- supabase_auth-2.33.0/src/supabase_auth/version.py +1 -0
- supabase_auth-2.32.0/src/supabase_auth/version.py +0 -1
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/README.md +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/__init__.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_admin_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_admin_oauth_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_base_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_admin_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_admin_oauth_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_base_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/constants.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/py.typed +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/timer.py +0 -0
- {supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/types.py +0 -0
|
@@ -450,7 +450,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
450
450
|
options = credentials.get("options", {})
|
|
451
451
|
redirect_to = options.get("redirect_to")
|
|
452
452
|
scopes = options.get("scopes")
|
|
453
|
-
params = options.get("query_params", {})
|
|
453
|
+
params = {**options.get("query_params", {})}
|
|
454
454
|
if redirect_to:
|
|
455
455
|
params["redirect_to"] = redirect_to
|
|
456
456
|
if scopes:
|
|
@@ -750,7 +750,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
750
750
|
else:
|
|
751
751
|
user_response = await self.get_user(access_token)
|
|
752
752
|
if user_response is None:
|
|
753
|
-
raise UserDoesntExist(
|
|
753
|
+
raise UserDoesntExist()
|
|
754
754
|
session = Session(
|
|
755
755
|
access_token=access_token,
|
|
756
756
|
refresh_token=refresh_token,
|
|
@@ -1025,7 +1025,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1025
1025
|
expires_at = time_now + int(expires_in)
|
|
1026
1026
|
user = await self.get_user(access_token)
|
|
1027
1027
|
if user is None:
|
|
1028
|
-
raise UserDoesntExist(
|
|
1028
|
+
raise UserDoesntExist()
|
|
1029
1029
|
session = Session(
|
|
1030
1030
|
provider_token=provider_token,
|
|
1031
1031
|
provider_refresh_token=provider_refresh_token,
|
|
@@ -1055,6 +1055,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1055
1055
|
try:
|
|
1056
1056
|
await self._call_refresh_token(refresh_token)
|
|
1057
1057
|
self._network_retries = 0
|
|
1058
|
+
return
|
|
1058
1059
|
except Exception as e:
|
|
1059
1060
|
if (
|
|
1060
1061
|
isinstance(e, AuthRetryableError)
|
|
@@ -1139,7 +1140,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1139
1140
|
event: AuthChangeEvent,
|
|
1140
1141
|
session: Optional[Session],
|
|
1141
1142
|
) -> None:
|
|
1142
|
-
for subscription in self._state_change_emitters.values():
|
|
1143
|
+
for subscription in list(self._state_change_emitters.values()):
|
|
1143
1144
|
subscription.callback(event, session)
|
|
1144
1145
|
|
|
1145
1146
|
def _get_valid_session(
|
|
@@ -448,7 +448,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
448
448
|
options = credentials.get("options", {})
|
|
449
449
|
redirect_to = options.get("redirect_to")
|
|
450
450
|
scopes = options.get("scopes")
|
|
451
|
-
params = options.get("query_params", {})
|
|
451
|
+
params = {**options.get("query_params", {})}
|
|
452
452
|
if redirect_to:
|
|
453
453
|
params["redirect_to"] = redirect_to
|
|
454
454
|
if scopes:
|
|
@@ -746,7 +746,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
746
746
|
else:
|
|
747
747
|
user_response = self.get_user(access_token)
|
|
748
748
|
if user_response is None:
|
|
749
|
-
raise UserDoesntExist(
|
|
749
|
+
raise UserDoesntExist()
|
|
750
750
|
session = Session(
|
|
751
751
|
access_token=access_token,
|
|
752
752
|
refresh_token=refresh_token,
|
|
@@ -1019,7 +1019,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1019
1019
|
expires_at = time_now + int(expires_in)
|
|
1020
1020
|
user = self.get_user(access_token)
|
|
1021
1021
|
if user is None:
|
|
1022
|
-
raise UserDoesntExist(
|
|
1022
|
+
raise UserDoesntExist()
|
|
1023
1023
|
session = Session(
|
|
1024
1024
|
provider_token=provider_token,
|
|
1025
1025
|
provider_refresh_token=provider_refresh_token,
|
|
@@ -1049,6 +1049,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1049
1049
|
try:
|
|
1050
1050
|
self._call_refresh_token(refresh_token)
|
|
1051
1051
|
self._network_retries = 0
|
|
1052
|
+
return
|
|
1052
1053
|
except Exception as e:
|
|
1053
1054
|
if (
|
|
1054
1055
|
isinstance(e, AuthRetryableError)
|
|
@@ -1133,7 +1134,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1133
1134
|
event: AuthChangeEvent,
|
|
1134
1135
|
session: Optional[Session],
|
|
1135
1136
|
) -> None:
|
|
1136
|
-
for subscription in self._state_change_emitters.values():
|
|
1137
|
+
for subscription in list(self._state_change_emitters.values()):
|
|
1137
1138
|
subscription.callback(event, session)
|
|
1138
1139
|
|
|
1139
1140
|
def _get_valid_session(
|
|
@@ -90,11 +90,6 @@ ErrorCode = Literal[
|
|
|
90
90
|
]
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
class UserDoesntExist(Exception):
|
|
94
|
-
def __init__(self, access_token: str) -> None:
|
|
95
|
-
self.access_token = access_token
|
|
96
|
-
|
|
97
|
-
|
|
98
93
|
class AuthError(Exception):
|
|
99
94
|
def __init__(self, message: str, code: ErrorCode | None) -> None:
|
|
100
95
|
Exception.__init__(self, message)
|
|
@@ -150,6 +145,17 @@ class CustomAuthError(AuthError):
|
|
|
150
145
|
}
|
|
151
146
|
|
|
152
147
|
|
|
148
|
+
class UserDoesntExist(CustomAuthError):
|
|
149
|
+
def __init__(self) -> None:
|
|
150
|
+
CustomAuthError.__init__(
|
|
151
|
+
self,
|
|
152
|
+
"User does not exist for the provided access token",
|
|
153
|
+
"UserDoesntExist",
|
|
154
|
+
404,
|
|
155
|
+
"user_not_found",
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
|
|
153
159
|
class AuthSessionMissingError(CustomAuthError):
|
|
154
160
|
def __init__(self) -> None:
|
|
155
161
|
CustomAuthError.__init__(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.33.0" # {x-release-please-version}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.32.0" # {x-release-please-version}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
{supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_async/gotrue_admin_oauth_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
{supabase_auth-2.32.0 → supabase_auth-2.33.0}/src/supabase_auth/_sync/gotrue_admin_oauth_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|