supabase_auth 2.5.5__tar.gz → 2.6.1__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.5.5 → supabase_auth-2.6.1}/PKG-INFO +1 -1
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/pyproject.toml +4 -4
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/__init__.py +1 -1
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/gotrue_client.py +39 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/gotrue_client.py +39 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/types.py +18 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/LICENSE +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/README.md +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/__init__.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/gotrue_admin_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/gotrue_base_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_async/storage.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/__init__.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/client.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/gotrue_admin_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/gotrue_base_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/_sync/storage.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/constants.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/errors.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/helpers.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/supabase_auth/http_clients.py +0 -0
- {supabase_auth-2.5.5 → supabase_auth-2.6.1}/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.6.1"
|
|
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"
|
|
@@ -20,17 +20,17 @@ httpx = {version = ">=0.24,<0.28", extras = ["http2"]}
|
|
|
20
20
|
pydantic = ">=1.10,<3"
|
|
21
21
|
|
|
22
22
|
[tool.poetry.dev-dependencies]
|
|
23
|
-
pytest = "^8.
|
|
23
|
+
pytest = "^8.3.1"
|
|
24
24
|
flake8 = "^5.0.4"
|
|
25
25
|
black = "^24.4.2"
|
|
26
26
|
isort = "^5.12.0"
|
|
27
27
|
pre-commit = "^3.4.0"
|
|
28
28
|
pytest-cov = "^5.0.0"
|
|
29
29
|
pytest-depends = "^1.0.1"
|
|
30
|
-
pytest-asyncio = "^0.23.
|
|
30
|
+
pytest-asyncio = "^0.23.8"
|
|
31
31
|
Faker = "^26.0.0"
|
|
32
32
|
unasync-cli = "^0.0.9"
|
|
33
|
-
python-semantic-release = "^9.8.
|
|
33
|
+
python-semantic-release = "^9.8.6"
|
|
34
34
|
|
|
35
35
|
[tool.poetry.group.dev.dependencies]
|
|
36
36
|
pygithub = ">=1.57,<3.0"
|
|
@@ -63,6 +63,7 @@ from ..types import (
|
|
|
63
63
|
Provider,
|
|
64
64
|
Session,
|
|
65
65
|
SignInAnonymouslyCredentials,
|
|
66
|
+
SignInWithIdTokenCredentials,
|
|
66
67
|
SignInWithOAuthCredentials,
|
|
67
68
|
SignInWithPasswordCredentials,
|
|
68
69
|
SignInWithPasswordlessCredentials,
|
|
@@ -293,6 +294,44 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
|
|
|
293
294
|
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
294
295
|
return response
|
|
295
296
|
|
|
297
|
+
async def sign_in_with_id_token(
|
|
298
|
+
self,
|
|
299
|
+
credentials: SignInWithIdTokenCredentials,
|
|
300
|
+
) -> AuthResponse:
|
|
301
|
+
"""
|
|
302
|
+
Allows signing in with an OIDC ID token. The authentication provider used should be enabled and configured.
|
|
303
|
+
"""
|
|
304
|
+
await self._remove_session()
|
|
305
|
+
provider = credentials.get("provider")
|
|
306
|
+
token = credentials.get("token")
|
|
307
|
+
access_token = credentials.get("access_token")
|
|
308
|
+
nonce = credentials.get("nonce")
|
|
309
|
+
options = credentials.get("options", {})
|
|
310
|
+
captcha_token = options.get("captcha_token")
|
|
311
|
+
|
|
312
|
+
response = await self._request(
|
|
313
|
+
"POST",
|
|
314
|
+
"token",
|
|
315
|
+
body={
|
|
316
|
+
"provider": provider,
|
|
317
|
+
"id_token": token,
|
|
318
|
+
"access_token": access_token,
|
|
319
|
+
"nonce": nonce,
|
|
320
|
+
"gotrue_meta_security": {
|
|
321
|
+
"captcha_token": captcha_token,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
query={
|
|
325
|
+
"grant_type": "id_token",
|
|
326
|
+
},
|
|
327
|
+
xform=parse_auth_response,
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
if response.session:
|
|
331
|
+
await self._save_session(response.session)
|
|
332
|
+
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
333
|
+
return response
|
|
334
|
+
|
|
296
335
|
async def sign_in_with_sso(self, credentials: SignInWithSSOCredentials):
|
|
297
336
|
"""
|
|
298
337
|
Attempts a single-sign on using an enterprise Identity Provider. A
|
|
@@ -63,6 +63,7 @@ from ..types import (
|
|
|
63
63
|
Provider,
|
|
64
64
|
Session,
|
|
65
65
|
SignInAnonymouslyCredentials,
|
|
66
|
+
SignInWithIdTokenCredentials,
|
|
66
67
|
SignInWithOAuthCredentials,
|
|
67
68
|
SignInWithPasswordCredentials,
|
|
68
69
|
SignInWithPasswordlessCredentials,
|
|
@@ -293,6 +294,44 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
|
|
|
293
294
|
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
294
295
|
return response
|
|
295
296
|
|
|
297
|
+
def sign_in_with_id_token(
|
|
298
|
+
self,
|
|
299
|
+
credentials: SignInWithIdTokenCredentials,
|
|
300
|
+
) -> AuthResponse:
|
|
301
|
+
"""
|
|
302
|
+
Allows signing in with an OIDC ID token. The authentication provider used should be enabled and configured.
|
|
303
|
+
"""
|
|
304
|
+
self._remove_session()
|
|
305
|
+
provider = credentials.get("provider")
|
|
306
|
+
token = credentials.get("token")
|
|
307
|
+
access_token = credentials.get("access_token")
|
|
308
|
+
nonce = credentials.get("nonce")
|
|
309
|
+
options = credentials.get("options", {})
|
|
310
|
+
captcha_token = options.get("captcha_token")
|
|
311
|
+
|
|
312
|
+
response = self._request(
|
|
313
|
+
"POST",
|
|
314
|
+
"token",
|
|
315
|
+
body={
|
|
316
|
+
"provider": provider,
|
|
317
|
+
"id_token": token,
|
|
318
|
+
"access_token": access_token,
|
|
319
|
+
"nonce": nonce,
|
|
320
|
+
"gotrue_meta_security": {
|
|
321
|
+
"captcha_token": captcha_token,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
query={
|
|
325
|
+
"grant_type": "id_token",
|
|
326
|
+
},
|
|
327
|
+
xform=parse_auth_response,
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
if response.session:
|
|
331
|
+
self._save_session(response.session)
|
|
332
|
+
self._notify_all_subscribers("SIGNED_IN", response.session)
|
|
333
|
+
return response
|
|
334
|
+
|
|
296
335
|
def sign_in_with_sso(self, credentials: SignInWithSSOCredentials):
|
|
297
336
|
"""
|
|
298
337
|
Attempts a single-sign on using an enterprise Identity Provider. A
|
|
@@ -199,6 +199,7 @@ class User(BaseModel):
|
|
|
199
199
|
recovery_sent_at: Union[datetime, None] = None
|
|
200
200
|
email_change_sent_at: Union[datetime, None] = None
|
|
201
201
|
new_email: Union[str, None] = None
|
|
202
|
+
new_phone: Union[str, None] = None
|
|
202
203
|
invited_at: Union[datetime, None] = None
|
|
203
204
|
action_link: Union[str, None] = None
|
|
204
205
|
email: Union[str, None] = None
|
|
@@ -211,6 +212,7 @@ class User(BaseModel):
|
|
|
211
212
|
role: Union[str, None] = None
|
|
212
213
|
updated_at: Union[datetime, None] = None
|
|
213
214
|
identities: Union[List[UserIdentity], None] = None
|
|
215
|
+
is_anonymous: bool = False
|
|
214
216
|
factors: Union[List[Factor], None] = None
|
|
215
217
|
|
|
216
218
|
|
|
@@ -303,6 +305,22 @@ SignInWithPasswordCredentials = Union[
|
|
|
303
305
|
]
|
|
304
306
|
|
|
305
307
|
|
|
308
|
+
class SignInWithIdTokenCredentials(TypedDict):
|
|
309
|
+
"""
|
|
310
|
+
Provider name or OIDC `iss` value identifying which provider should be used to verify the provided token. Supported names: `google`, `apple`, `azure`, `facebook`, `kakao`, `keycloak` (deprecated).
|
|
311
|
+
"""
|
|
312
|
+
|
|
313
|
+
provider: Literal["google", "apple", "azure", "facebook", "kakao"]
|
|
314
|
+
token: str
|
|
315
|
+
access_token: NotRequired[str]
|
|
316
|
+
nonce: NotRequired[str]
|
|
317
|
+
options: NotRequired[SignInWithIdTokenCredentialsOptions]
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
class SignInWithIdTokenCredentialsOptions(TypedDict):
|
|
321
|
+
captcha_token: NotRequired[str]
|
|
322
|
+
|
|
323
|
+
|
|
306
324
|
class SignInWithEmailAndPasswordlessCredentialsOptions(TypedDict):
|
|
307
325
|
email_redirect_to: NotRequired[str]
|
|
308
326
|
should_create_user: NotRequired[bool]
|
|
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
|