supabase_auth 2.4.3__tar.gz → 2.5.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.4.3 → supabase_auth-2.5.0}/PKG-INFO +1 -1
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/pyproject.toml +3 -3
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/__init__.py +1 -1
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/gotrue_base_api.py +3 -1
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/gotrue_client.py +30 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/api.py +3 -1
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/gotrue_base_api.py +3 -1
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/gotrue_client.py +30 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/types.py +9 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/LICENSE +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/README.md +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/gotrue_admin_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/client.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/gotrue_admin_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/constants.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/errors.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/http_clients.py +0 -0
- {supabase_auth-2.4.3 → supabase_auth-2.5.0}/supabase_auth/timer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "supabase_auth"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.5.0"
|
|
4
4
|
description = "Python Client Library for Supabase Auth"
|
|
5
5
|
authors = ["Joel Lee <joel@joellee.org>"]
|
|
6
6
|
homepage = "https://github.com/supabase-community/auth-py"
|
|
@@ -28,9 +28,9 @@ pre-commit = "^3.4.0"
|
|
|
28
28
|
pytest-cov = "^5.0.0"
|
|
29
29
|
pytest-depends = "^1.0.1"
|
|
30
30
|
pytest-asyncio = "^0.23.7"
|
|
31
|
-
Faker = "^25.
|
|
31
|
+
Faker = "^25.4.0"
|
|
32
32
|
unasync-cli = "^0.0.9"
|
|
33
|
-
python-semantic-release = "^9.8.
|
|
33
|
+
python-semantic-release = "^9.8.1"
|
|
34
34
|
|
|
35
35
|
[tool.poetry.group.dev.dependencies]
|
|
36
36
|
pygithub = ">=1.57,<3.0"
|
|
@@ -23,7 +23,9 @@ class AsyncGoTrueBaseAPI:
|
|
|
23
23
|
):
|
|
24
24
|
self._url = url
|
|
25
25
|
self._headers = headers
|
|
26
|
-
self._http_client = http_client or AsyncClient(
|
|
26
|
+
self._http_client = http_client or AsyncClient(
|
|
27
|
+
verify=bool(verify), follow_redirects=True
|
|
28
|
+
)
|
|
27
29
|
|
|
28
30
|
async def __aenter__(self) -> Self:
|
|
29
31
|
return self
|
|
@@ -61,9 +61,11 @@ from ..types import (
|
|
|
61
61
|
Options,
|
|
62
62
|
Provider,
|
|
63
63
|
Session,
|
|
64
|
+
SignInAnonymouslyCredentials,
|
|
64
65
|
SignInWithOAuthCredentials,
|
|
65
66
|
SignInWithPasswordCredentials,
|
|
66
67
|
SignInWithPasswordlessCredentials,
|
|
68
|
+
SignInWithSSOCredentials,
|
|
67
69
|
SignOutOptions,
|
|
68
70
|
SignUpWithPasswordCredentials,
|
|
69
71
|
Subscription,
|
|
@@ -149,6 +151,34 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
149
151
|
|
|
150
152
|
# Public methods
|
|
151
153
|
|
|
154
|
+
async def sign_in_anonymously(
|
|
155
|
+
self, credentials: Union[SignInAnonymouslyCredentials, None] = None
|
|
156
|
+
) -> AuthResponse:
|
|
157
|
+
"""
|
|
158
|
+
Creates a new anonymous user.
|
|
159
|
+
"""
|
|
160
|
+
self._remove_session()
|
|
161
|
+
if credentials is None:
|
|
162
|
+
credentials = {"options": {}}
|
|
163
|
+
options = credentials.get("options", {})
|
|
164
|
+
data = options.get("data") or {}
|
|
165
|
+
captcha_token = options.get("captcha_token")
|
|
166
|
+
response = self._request(
|
|
167
|
+
"POST",
|
|
168
|
+
"signup",
|
|
169
|
+
body={
|
|
170
|
+
"data": data,
|
|
171
|
+
"gotrue_meta_security": {
|
|
172
|
+
"captcha_token": captcha_token,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
xform=parse_auth_response,
|
|
176
|
+
)
|
|
177
|
+
if response.session:
|
|
178
|
+
self._save_session(response.session)
|
|
179
|
+
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
180
|
+
return response
|
|
181
|
+
|
|
152
182
|
async def sign_up(
|
|
153
183
|
self,
|
|
154
184
|
credentials: SignUpWithPasswordCredentials,
|
|
@@ -32,7 +32,9 @@ class SyncGoTrueAPI:
|
|
|
32
32
|
self.url = url
|
|
33
33
|
self.headers = headers
|
|
34
34
|
self.cookie_options = cookie_options
|
|
35
|
-
self.http_client = http_client or SyncClient(
|
|
35
|
+
self.http_client = http_client or SyncClient(
|
|
36
|
+
verify=bool(verify), follow_redirects=True
|
|
37
|
+
)
|
|
36
38
|
|
|
37
39
|
def __enter__(self) -> SyncGoTrueAPI:
|
|
38
40
|
return self
|
|
@@ -23,7 +23,9 @@ class SyncGoTrueBaseAPI:
|
|
|
23
23
|
):
|
|
24
24
|
self._url = url
|
|
25
25
|
self._headers = headers
|
|
26
|
-
self._http_client = http_client or SyncClient(
|
|
26
|
+
self._http_client = http_client or SyncClient(
|
|
27
|
+
verify=bool(verify), follow_redirects=True
|
|
28
|
+
)
|
|
27
29
|
|
|
28
30
|
def __enter__(self) -> Self:
|
|
29
31
|
return self
|
|
@@ -61,9 +61,11 @@ from ..types import (
|
|
|
61
61
|
Options,
|
|
62
62
|
Provider,
|
|
63
63
|
Session,
|
|
64
|
+
SignInAnonymouslyCredentials,
|
|
64
65
|
SignInWithOAuthCredentials,
|
|
65
66
|
SignInWithPasswordCredentials,
|
|
66
67
|
SignInWithPasswordlessCredentials,
|
|
68
|
+
SignInWithSSOCredentials,
|
|
67
69
|
SignOutOptions,
|
|
68
70
|
SignUpWithPasswordCredentials,
|
|
69
71
|
Subscription,
|
|
@@ -149,6 +151,34 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
149
151
|
|
|
150
152
|
# Public methods
|
|
151
153
|
|
|
154
|
+
def sign_in_anonymously(
|
|
155
|
+
self, credentials: Union[SignInAnonymouslyCredentials, None] = None
|
|
156
|
+
) -> AuthResponse:
|
|
157
|
+
"""
|
|
158
|
+
Creates a new anonymous user.
|
|
159
|
+
"""
|
|
160
|
+
self._remove_session()
|
|
161
|
+
if credentials is None:
|
|
162
|
+
credentials = {"options": {}}
|
|
163
|
+
options = credentials.get("options", {})
|
|
164
|
+
data = options.get("data") or {}
|
|
165
|
+
captcha_token = options.get("captcha_token")
|
|
166
|
+
response = self._request(
|
|
167
|
+
"POST",
|
|
168
|
+
"signup",
|
|
169
|
+
body={
|
|
170
|
+
"data": data,
|
|
171
|
+
"gotrue_meta_security": {
|
|
172
|
+
"captcha_token": captcha_token,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
xform=parse_auth_response,
|
|
176
|
+
)
|
|
177
|
+
if response.session:
|
|
178
|
+
self._save_session(response.session)
|
|
179
|
+
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
180
|
+
return response
|
|
181
|
+
|
|
152
182
|
def sign_up(
|
|
153
183
|
self,
|
|
154
184
|
credentials: SignUpWithPasswordCredentials,
|
|
@@ -348,6 +348,15 @@ class SignInWithSSOOptions(TypedDict):
|
|
|
348
348
|
skip_http_redirect: NotRequired[bool]
|
|
349
349
|
|
|
350
350
|
|
|
351
|
+
class SignInAnonymouslyCredentials(TypedDict):
|
|
352
|
+
options: NotRequired[SignInAnonymouslyCredentialsOptions]
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class SignInAnonymouslyCredentialsOptions(TypedDict):
|
|
356
|
+
data: NotRequired[Any]
|
|
357
|
+
captcha_token: NotRequired[str]
|
|
358
|
+
|
|
359
|
+
|
|
351
360
|
class VerifyOtpParamsOptions(TypedDict):
|
|
352
361
|
redirect_to: NotRequired[str]
|
|
353
362
|
captcha_token: NotRequired[str]
|
|
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
|