supabase_auth 2.28.0__tar.gz → 2.28.2__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.28.0 → supabase_auth-2.28.2}/PKG-INFO +1 -1
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/pyproject.toml +2 -1
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_admin_api.py +2 -1
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_client.py +2 -3
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_admin_api.py +2 -1
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_client.py +2 -3
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/types.py +6 -39
- supabase_auth-2.28.2/src/supabase_auth/version.py +1 -0
- supabase_auth-2.28.0/src/supabase_auth/version.py +0 -1
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/README.md +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/__init__.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_admin_oauth_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_base_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_admin_oauth_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_base_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/constants.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/errors.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/py.typed +0 -0
- {supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/timer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "supabase_auth"
|
|
3
|
-
version = "2.28.
|
|
3
|
+
version = "2.28.2" # {x-release-please-version}
|
|
4
4
|
description = "Python Client Library for Supabase Auth"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Joel Lee", email = "joel@joellee.org" }
|
|
@@ -40,6 +40,7 @@ tests = [
|
|
|
40
40
|
"pytest-cov >= 6.2.1",
|
|
41
41
|
"pytest-depends >= 1.0.1",
|
|
42
42
|
"pytest-asyncio >= 1.0.0",
|
|
43
|
+
"pyotp>=2.9.0",
|
|
43
44
|
]
|
|
44
45
|
lints = [
|
|
45
46
|
"ruff >=0.12.1",
|
|
@@ -16,6 +16,7 @@ from ..types import (
|
|
|
16
16
|
AuthMFAAdminDeleteFactorResponse,
|
|
17
17
|
AuthMFAAdminListFactorsParams,
|
|
18
18
|
AuthMFAAdminListFactorsResponse,
|
|
19
|
+
AuthMFAAdminListFactorsResponseParser,
|
|
19
20
|
CreateOAuthClientParams,
|
|
20
21
|
GenerateLinkParams,
|
|
21
22
|
GenerateLinkResponse,
|
|
@@ -200,7 +201,7 @@ class AsyncGoTrueAdminAPI(AsyncGoTrueBaseAPI):
|
|
|
200
201
|
"GET",
|
|
201
202
|
f"admin/users/{params.get('user_id')}/factors",
|
|
202
203
|
)
|
|
203
|
-
return
|
|
204
|
+
return AuthMFAAdminListFactorsResponseParser.validate_json(response.content)
|
|
204
205
|
|
|
205
206
|
async def _delete_factor(
|
|
206
207
|
self,
|
|
@@ -17,7 +17,6 @@ from ..constants import (
|
|
|
17
17
|
EXPIRY_MARGIN,
|
|
18
18
|
GOTRUE_URL,
|
|
19
19
|
MAX_RETRIES,
|
|
20
|
-
RETRY_INTERVAL,
|
|
21
20
|
STORAGE_KEY,
|
|
22
21
|
)
|
|
23
22
|
from ..errors import (
|
|
@@ -1062,7 +1061,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1062
1061
|
if self._refresh_token_timer:
|
|
1063
1062
|
self._refresh_token_timer.cancel()
|
|
1064
1063
|
self._refresh_token_timer = Timer(
|
|
1065
|
-
(
|
|
1064
|
+
(200 * (2 ** (self._network_retries - 1))),
|
|
1066
1065
|
self._recover_and_refresh,
|
|
1067
1066
|
)
|
|
1068
1067
|
self._refresh_token_timer.start()
|
|
@@ -1127,7 +1126,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1127
1126
|
and self._network_retries < MAX_RETRIES
|
|
1128
1127
|
):
|
|
1129
1128
|
await self._start_auto_refresh_token(
|
|
1130
|
-
|
|
1129
|
+
200 * (2 ** (self._network_retries - 1))
|
|
1131
1130
|
)
|
|
1132
1131
|
|
|
1133
1132
|
self._refresh_token_timer = Timer(value, refresh_token_function)
|
|
@@ -16,6 +16,7 @@ from ..types import (
|
|
|
16
16
|
AuthMFAAdminDeleteFactorResponse,
|
|
17
17
|
AuthMFAAdminListFactorsParams,
|
|
18
18
|
AuthMFAAdminListFactorsResponse,
|
|
19
|
+
AuthMFAAdminListFactorsResponseParser,
|
|
19
20
|
CreateOAuthClientParams,
|
|
20
21
|
GenerateLinkParams,
|
|
21
22
|
GenerateLinkResponse,
|
|
@@ -200,7 +201,7 @@ class SyncGoTrueAdminAPI(SyncGoTrueBaseAPI):
|
|
|
200
201
|
"GET",
|
|
201
202
|
f"admin/users/{params.get('user_id')}/factors",
|
|
202
203
|
)
|
|
203
|
-
return
|
|
204
|
+
return AuthMFAAdminListFactorsResponseParser.validate_json(response.content)
|
|
204
205
|
|
|
205
206
|
def _delete_factor(
|
|
206
207
|
self,
|
|
@@ -17,7 +17,6 @@ from ..constants import (
|
|
|
17
17
|
EXPIRY_MARGIN,
|
|
18
18
|
GOTRUE_URL,
|
|
19
19
|
MAX_RETRIES,
|
|
20
|
-
RETRY_INTERVAL,
|
|
21
20
|
STORAGE_KEY,
|
|
22
21
|
)
|
|
23
22
|
from ..errors import (
|
|
@@ -1056,7 +1055,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1056
1055
|
if self._refresh_token_timer:
|
|
1057
1056
|
self._refresh_token_timer.cancel()
|
|
1058
1057
|
self._refresh_token_timer = Timer(
|
|
1059
|
-
(
|
|
1058
|
+
(200 * (2 ** (self._network_retries - 1))),
|
|
1060
1059
|
self._recover_and_refresh,
|
|
1061
1060
|
)
|
|
1062
1061
|
self._refresh_token_timer.start()
|
|
@@ -1121,7 +1120,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1121
1120
|
and self._network_retries < MAX_RETRIES
|
|
1122
1121
|
):
|
|
1123
1122
|
self._start_auto_refresh_token(
|
|
1124
|
-
|
|
1123
|
+
200 * (2 ** (self._network_retries - 1))
|
|
1125
1124
|
)
|
|
1126
1125
|
|
|
1127
1126
|
self._refresh_token_timer = Timer(value, refresh_token_function)
|
|
@@ -4,7 +4,7 @@ from datetime import datetime
|
|
|
4
4
|
from time import time
|
|
5
5
|
from typing import Any, Callable, Dict, List, Optional, Union
|
|
6
6
|
|
|
7
|
-
from pydantic import BaseModel, ConfigDict, Field, with_config
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field, TypeAdapter, with_config
|
|
8
8
|
|
|
9
9
|
try:
|
|
10
10
|
# > 2
|
|
@@ -760,11 +760,11 @@ class AuthMFAAdminDeleteFactorParams(TypedDict):
|
|
|
760
760
|
"""
|
|
761
761
|
|
|
762
762
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
763
|
+
AuthMFAAdminListFactorsResponse = List[Factor]
|
|
764
|
+
|
|
765
|
+
AuthMFAAdminListFactorsResponseParser: TypeAdapter[AuthMFAAdminListFactorsResponse] = (
|
|
766
|
+
TypeAdapter(AuthMFAAdminListFactorsResponse)
|
|
767
|
+
)
|
|
768
768
|
|
|
769
769
|
|
|
770
770
|
class AuthMFAAdminListFactorsParams(TypedDict):
|
|
@@ -1029,36 +1029,3 @@ class PageParams(BaseModel):
|
|
|
1029
1029
|
"""Page number"""
|
|
1030
1030
|
per_page: Optional[int] = None
|
|
1031
1031
|
"""Number of items per page"""
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
for model in [
|
|
1035
|
-
AMREntry,
|
|
1036
|
-
AuthResponse,
|
|
1037
|
-
OAuthResponse,
|
|
1038
|
-
UserResponse,
|
|
1039
|
-
Session,
|
|
1040
|
-
UserIdentity,
|
|
1041
|
-
Factor,
|
|
1042
|
-
User,
|
|
1043
|
-
Subscription,
|
|
1044
|
-
AuthMFAVerifyResponse,
|
|
1045
|
-
AuthMFAEnrollResponseTotp,
|
|
1046
|
-
AuthMFAEnrollResponse,
|
|
1047
|
-
AuthMFAUnenrollResponse,
|
|
1048
|
-
AuthMFAChallengeResponse,
|
|
1049
|
-
AuthMFAListFactorsResponse,
|
|
1050
|
-
AuthMFAGetAuthenticatorAssuranceLevelResponse,
|
|
1051
|
-
AuthMFAAdminDeleteFactorResponse,
|
|
1052
|
-
AuthMFAAdminListFactorsResponse,
|
|
1053
|
-
GenerateLinkProperties,
|
|
1054
|
-
OAuthClient,
|
|
1055
|
-
OAuthClientResponse,
|
|
1056
|
-
OAuthClientListResponse,
|
|
1057
|
-
Pagination,
|
|
1058
|
-
]:
|
|
1059
|
-
try:
|
|
1060
|
-
# pydantic > 2
|
|
1061
|
-
model.model_rebuild() # type: ignore
|
|
1062
|
-
except AttributeError:
|
|
1063
|
-
# pydantic < 2
|
|
1064
|
-
model.update_forward_refs() # type: ignore
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.28.2" # {x-release-please-version}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.28.0" # {x-release-please-version}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_async/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
{supabase_auth-2.28.0 → supabase_auth-2.28.2}/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
|
{supabase_auth-2.28.0 → supabase_auth-2.28.2}/src/supabase_auth/_sync/gotrue_admin_mfa_api.py
RENAMED
|
File without changes
|
{supabase_auth-2.28.0 → supabase_auth-2.28.2}/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
|