supabase_auth 2.11.0__tar.gz → 2.11.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.11.0 → supabase_auth-2.11.2}/PKG-INFO +3 -2
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/pyproject.toml +6 -6
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/gotrue_client.py +12 -11
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/gotrue_client.py +11 -6
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/errors.py +16 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/timer.py +1 -0
- supabase_auth-2.11.2/supabase_auth/version.py +1 -0
- supabase_auth-2.11.0/supabase_auth/version.py +0 -1
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/LICENSE +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/README.md +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/__init__.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/gotrue_admin_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/gotrue_base_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/client.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/gotrue_admin_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/gotrue_base_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/constants.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/http_clients.py +0 -0
- {supabase_auth-2.11.0 → supabase_auth-2.11.2}/supabase_auth/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: supabase_auth
|
|
3
|
-
Version: 2.11.
|
|
3
|
+
Version: 2.11.2
|
|
4
4
|
Summary: Python Client Library for Supabase Auth
|
|
5
5
|
Home-page: https://github.com/supabase/auth-py
|
|
6
6
|
License: MIT
|
|
@@ -14,7 +14,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Dist: httpx[http2] (>=0.26,<0.29)
|
|
18
19
|
Requires-Dist: pydantic (>=1.10,<3)
|
|
19
20
|
Project-URL: Documentation, https://github.com/supabase/auth-py
|
|
20
21
|
Project-URL: Repository, https://github.com/supabase/auth-py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "supabase_auth"
|
|
3
|
-
version = "2.11.
|
|
3
|
+
version = "2.11.2" # {x-release-please-version}
|
|
4
4
|
description = "Python Client Library for Supabase Auth"
|
|
5
5
|
authors = ["Joel Lee <joel@joellee.org>"]
|
|
6
6
|
homepage = "https://github.com/supabase/auth-py"
|
|
@@ -16,24 +16,24 @@ classifiers = [
|
|
|
16
16
|
|
|
17
17
|
[tool.poetry.dependencies]
|
|
18
18
|
python = "^3.9"
|
|
19
|
-
httpx = {version = ">=0.26,<0.
|
|
19
|
+
httpx = {version = ">=0.26,<0.29", extras = ["http2"]}
|
|
20
20
|
pydantic = ">=1.10,<3"
|
|
21
21
|
|
|
22
22
|
[tool.poetry.dev-dependencies]
|
|
23
|
-
pytest = "^8.3.
|
|
23
|
+
pytest = "^8.3.4"
|
|
24
24
|
flake8 = "^7.1.1"
|
|
25
25
|
black = "^24.4.2"
|
|
26
26
|
isort = "^5.12.0"
|
|
27
27
|
pre-commit = "^4.0.1"
|
|
28
28
|
pytest-cov = "^6.0.0"
|
|
29
29
|
pytest-depends = "^1.0.1"
|
|
30
|
-
pytest-asyncio = "^0.
|
|
31
|
-
Faker = "^33.
|
|
30
|
+
pytest-asyncio = "^0.25.2"
|
|
31
|
+
Faker = "^33.3.1"
|
|
32
32
|
unasync-cli = "^0.0.9"
|
|
33
33
|
|
|
34
34
|
[tool.poetry.group.dev.dependencies]
|
|
35
35
|
pygithub = ">=1.57,<3.0"
|
|
36
|
-
respx = ">=0.20.2,<0.
|
|
36
|
+
respx = ">=0.20.2,<0.23.0"
|
|
37
37
|
|
|
38
38
|
[build-system]
|
|
39
39
|
requires = ["poetry-core>=1.0.0"]
|
|
@@ -349,7 +349,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
349
349
|
If you have built an organization-specific login page, you can use the
|
|
350
350
|
organization's SSO Identity Provider UUID directly instead.
|
|
351
351
|
"""
|
|
352
|
-
self._remove_session()
|
|
352
|
+
await self._remove_session()
|
|
353
353
|
provider_id = credentials.get("provider_id")
|
|
354
354
|
domain = credentials.get("domain")
|
|
355
355
|
options = credentials.get("options", {})
|
|
@@ -361,7 +361,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
361
361
|
skip_http_redirect = options.get("skip_http_redirect", True)
|
|
362
362
|
|
|
363
363
|
if domain:
|
|
364
|
-
return self._request(
|
|
364
|
+
return await self._request(
|
|
365
365
|
"POST",
|
|
366
366
|
"sso",
|
|
367
367
|
body={
|
|
@@ -375,7 +375,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
375
375
|
xform=parse_sso_response,
|
|
376
376
|
)
|
|
377
377
|
if provider_id:
|
|
378
|
-
return self._request(
|
|
378
|
+
return await self._request(
|
|
379
379
|
"POST",
|
|
380
380
|
"sso",
|
|
381
381
|
body={
|
|
@@ -410,10 +410,10 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
410
410
|
params["redirect_to"] = redirect_to
|
|
411
411
|
if scopes:
|
|
412
412
|
params["scopes"] = scopes
|
|
413
|
-
|
|
413
|
+
url_with_qs, _ = await self._get_url_for_provider(
|
|
414
414
|
f"{self._url}/authorize", provider, params
|
|
415
415
|
)
|
|
416
|
-
return OAuthResponse(provider=provider, url=
|
|
416
|
+
return OAuthResponse(provider=provider, url=url_with_qs)
|
|
417
417
|
|
|
418
418
|
async def link_identity(
|
|
419
419
|
self, credentials: SignInWithOAuthCredentials
|
|
@@ -428,9 +428,8 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
428
428
|
if scopes:
|
|
429
429
|
params["scopes"] = scopes
|
|
430
430
|
params["skip_http_redirect"] = "true"
|
|
431
|
-
url =
|
|
432
|
-
|
|
433
|
-
)
|
|
431
|
+
url = "user/identities/authorize"
|
|
432
|
+
_, query = await self._get_url_for_provider(url, provider, params)
|
|
434
433
|
|
|
435
434
|
session = await self.get_session()
|
|
436
435
|
if not session:
|
|
@@ -439,6 +438,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
439
438
|
response = await self._request(
|
|
440
439
|
method="GET",
|
|
441
440
|
path=url,
|
|
441
|
+
query=query,
|
|
442
442
|
jwt=session.access_token,
|
|
443
443
|
xform=parse_link_identity_response,
|
|
444
444
|
)
|
|
@@ -1109,7 +1109,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1109
1109
|
url: str,
|
|
1110
1110
|
provider: Provider,
|
|
1111
1111
|
params: Dict[str, str],
|
|
1112
|
-
) -> str:
|
|
1112
|
+
) -> Tuple[str, Dict[str, str]]:
|
|
1113
1113
|
if self._flow_type == "pkce":
|
|
1114
1114
|
code_verifier = generate_pkce_verifier()
|
|
1115
1115
|
code_challenge = generate_pkce_challenge(code_verifier)
|
|
@@ -1124,7 +1124,7 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1124
1124
|
|
|
1125
1125
|
params["provider"] = provider
|
|
1126
1126
|
query = urlencode(params)
|
|
1127
|
-
return f"{url}?{query}"
|
|
1127
|
+
return f"{url}?{query}", params
|
|
1128
1128
|
|
|
1129
1129
|
def _decode_jwt(self, jwt: str) -> DecodedJWTDict:
|
|
1130
1130
|
"""
|
|
@@ -1138,7 +1138,8 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
1138
1138
|
)
|
|
1139
1139
|
response = await self._request(
|
|
1140
1140
|
"POST",
|
|
1141
|
-
"token
|
|
1141
|
+
"token",
|
|
1142
|
+
query={"grant_type": "pkce"},
|
|
1142
1143
|
body={
|
|
1143
1144
|
"auth_code": params.get("auth_code"),
|
|
1144
1145
|
"code_verifier": code_verifier,
|
|
@@ -410,8 +410,10 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
410
410
|
params["redirect_to"] = redirect_to
|
|
411
411
|
if scopes:
|
|
412
412
|
params["scopes"] = scopes
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
url_with_qs, _ = self._get_url_for_provider(
|
|
414
|
+
f"{self._url}/authorize", provider, params
|
|
415
|
+
)
|
|
416
|
+
return OAuthResponse(provider=provider, url=url_with_qs)
|
|
415
417
|
|
|
416
418
|
def link_identity(self, credentials: SignInWithOAuthCredentials) -> OAuthResponse:
|
|
417
419
|
provider = credentials.get("provider")
|
|
@@ -424,7 +426,8 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
424
426
|
if scopes:
|
|
425
427
|
params["scopes"] = scopes
|
|
426
428
|
params["skip_http_redirect"] = "true"
|
|
427
|
-
url =
|
|
429
|
+
url = "user/identities/authorize"
|
|
430
|
+
_, query = self._get_url_for_provider(url, provider, params)
|
|
428
431
|
|
|
429
432
|
session = self.get_session()
|
|
430
433
|
if not session:
|
|
@@ -433,6 +436,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
433
436
|
response = self._request(
|
|
434
437
|
method="GET",
|
|
435
438
|
path=url,
|
|
439
|
+
query=query,
|
|
436
440
|
jwt=session.access_token,
|
|
437
441
|
xform=parse_link_identity_response,
|
|
438
442
|
)
|
|
@@ -1101,7 +1105,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1101
1105
|
url: str,
|
|
1102
1106
|
provider: Provider,
|
|
1103
1107
|
params: Dict[str, str],
|
|
1104
|
-
) -> str:
|
|
1108
|
+
) -> Tuple[str, Dict[str, str]]:
|
|
1105
1109
|
if self._flow_type == "pkce":
|
|
1106
1110
|
code_verifier = generate_pkce_verifier()
|
|
1107
1111
|
code_challenge = generate_pkce_challenge(code_verifier)
|
|
@@ -1114,7 +1118,7 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1114
1118
|
|
|
1115
1119
|
params["provider"] = provider
|
|
1116
1120
|
query = urlencode(params)
|
|
1117
|
-
return f"{url}?{query}"
|
|
1121
|
+
return f"{url}?{query}", params
|
|
1118
1122
|
|
|
1119
1123
|
def _decode_jwt(self, jwt: str) -> DecodedJWTDict:
|
|
1120
1124
|
"""
|
|
@@ -1128,7 +1132,8 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
1128
1132
|
)
|
|
1129
1133
|
response = self._request(
|
|
1130
1134
|
"POST",
|
|
1131
|
-
"token
|
|
1135
|
+
"token",
|
|
1136
|
+
query={"grant_type": "pkce"},
|
|
1132
1137
|
body={
|
|
1133
1138
|
"auth_code": params.get("auth_code"),
|
|
1134
1139
|
"code_verifier": code_verifier,
|
|
@@ -70,6 +70,22 @@ ErrorCode = Literal[
|
|
|
70
70
|
"over_email_send_rate_limit",
|
|
71
71
|
"over_sms_send_rate_limit",
|
|
72
72
|
"bad_code_verifier",
|
|
73
|
+
"anonymous_provider_disabled",
|
|
74
|
+
"hook_timeout",
|
|
75
|
+
"hook_timeout_after_retry",
|
|
76
|
+
"hook_payload_over_size_limit",
|
|
77
|
+
"hook_payload_invalid_content_type",
|
|
78
|
+
"request_timeout",
|
|
79
|
+
"mfa_phone_enroll_not_enabled",
|
|
80
|
+
"mfa_phone_verify_not_enabled",
|
|
81
|
+
"mfa_totp_enroll_not_enabled",
|
|
82
|
+
"mfa_totp_verify_not_enabled",
|
|
83
|
+
"mfa_webauthn_enroll_not_enabled",
|
|
84
|
+
"mfa_webauthn_verify_not_enabled",
|
|
85
|
+
"mfa_verified_factor_exists",
|
|
86
|
+
"invalid_credentials",
|
|
87
|
+
"email_address_not_authorized",
|
|
88
|
+
"email_address_invalid",
|
|
73
89
|
]
|
|
74
90
|
|
|
75
91
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.11.2" # {x-release-please-version}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.11.0" # {x-release-please-version}
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|