From 070fa6fd9dda5543bea37936afb690c5ed616c02 Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Wed, 6 Nov 2024 14:57:44 +0530 Subject: [PATCH 1/2] fix: lint fixes --- setup.py | 1 + .../dashboard/api/multitenancy/__init__.py | 0 .../api/multitenancy/get_tenant_info.py | 5 +--- .../multitenancy/get_third_party_config.py | 6 ++--- .../recipe/dashboard/api/user/__init__.py | 0 .../dashboard/api/user/create/__init__.py | 0 .../api/user/create/emailpassword_user.py | 2 +- .../api/user/create/passwordless_user.py | 12 ++++----- .../dashboard/api/userroles/__init__.py | 0 .../api/userroles/permissions/__init__.py | 0 .../permissions/get_permissions_for_role.py | 7 +++-- .../dashboard/api/userroles/roles/__init__.py | 0 .../api/userroles/roles/get_all_roles.py | 2 +- .../recipe/totp/api/__init__.py | 26 +++++++++++++++++++ .../recipe/totp/api/create_device.py | 2 +- .../recipe/totp/api/list_devices.py | 2 +- .../recipe/totp/api/remove_device.py | 2 +- .../recipe/totp/api/verify_device.py | 2 +- .../recipe/totp/api/verify_totp.py | 2 +- 19 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 supertokens_python/recipe/dashboard/api/multitenancy/__init__.py create mode 100644 supertokens_python/recipe/dashboard/api/user/__init__.py create mode 100644 supertokens_python/recipe/dashboard/api/user/create/__init__.py create mode 100644 supertokens_python/recipe/dashboard/api/userroles/__init__.py create mode 100644 supertokens_python/recipe/dashboard/api/userroles/permissions/__init__.py create mode 100644 supertokens_python/recipe/dashboard/api/userroles/roles/__init__.py create mode 100644 supertokens_python/recipe/totp/api/__init__.py diff --git a/setup.py b/setup.py index eef32f349..7970f074e 100644 --- a/setup.py +++ b/setup.py @@ -110,6 +110,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Intended Audience :: Developers", "Topic :: Internet :: WWW/HTTP :: Session", "License :: OSI Approved :: Apache Software License", diff --git a/supertokens_python/recipe/dashboard/api/multitenancy/__init__.py b/supertokens_python/recipe/dashboard/api/multitenancy/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/multitenancy/get_tenant_info.py b/supertokens_python/recipe/dashboard/api/multitenancy/get_tenant_info.py index 17f42b7e7..c25f5ec1e 100644 --- a/supertokens_python/recipe/dashboard/api/multitenancy/get_tenant_info.py +++ b/supertokens_python/recipe/dashboard/api/multitenancy/get_tenant_info.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from typing import Any, Dict, List, Union +from typing import Any, Dict, List, Union, Optional from typing_extensions import Literal from supertokens_python.recipe.multitenancy.asyncio import get_tenant @@ -32,9 +32,6 @@ from ...interfaces import APIInterface, APIOptions, CoreConfigFieldInfo -from typing import List, Optional - - class ThirdPartyProvider: def __init__(self, third_party_id: str, name: str): self.third_party_id = third_party_id diff --git a/supertokens_python/recipe/dashboard/api/multitenancy/get_third_party_config.py b/supertokens_python/recipe/dashboard/api/multitenancy/get_third_party_config.py index ef050343b..3520e0a9e 100644 --- a/supertokens_python/recipe/dashboard/api/multitenancy/get_third_party_config.py +++ b/supertokens_python/recipe/dashboard/api/multitenancy/get_third_party_config.py @@ -275,17 +275,17 @@ async def get_third_party_config( after_override = provider.override(before_override) if ( - before_override.get_authorisation_redirect_url + before_override.get_authorisation_redirect_url # pylint: disable=W0143 != after_override.get_authorisation_redirect_url ): is_get_authorisation_redirect_url_overridden = True if ( - before_override.exchange_auth_code_for_oauth_tokens + before_override.exchange_auth_code_for_oauth_tokens # pylint: disable=W0143 != after_override.exchange_auth_code_for_oauth_tokens ): is_exchange_auth_code_for_oauth_tokens_overridden = True if ( - before_override.get_user_info + before_override.get_user_info # pylint: disable=W0143 != after_override.get_user_info ): is_get_user_info_overridden = True diff --git a/supertokens_python/recipe/dashboard/api/user/__init__.py b/supertokens_python/recipe/dashboard/api/user/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/user/create/__init__.py b/supertokens_python/recipe/dashboard/api/user/create/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/user/create/emailpassword_user.py b/supertokens_python/recipe/dashboard/api/user/create/emailpassword_user.py index 3fe8a55af..9a5f4e6eb 100644 --- a/supertokens_python/recipe/dashboard/api/user/create/emailpassword_user.py +++ b/supertokens_python/recipe/dashboard/api/user/create/emailpassword_user.py @@ -63,7 +63,7 @@ async def create_email_password_user( _: APIInterface, tenant_id: str, api_options: APIOptions, - user_context: Dict[str, Any], + __: Dict[str, Any], ) -> Union[ CreateEmailPasswordUserOkResponse, CreateEmailPasswordUserFeatureNotEnabledResponse, diff --git a/supertokens_python/recipe/dashboard/api/user/create/passwordless_user.py b/supertokens_python/recipe/dashboard/api/user/create/passwordless_user.py index 00e470194..00c66fc78 100644 --- a/supertokens_python/recipe/dashboard/api/user/create/passwordless_user.py +++ b/supertokens_python/recipe/dashboard/api/user/create/passwordless_user.py @@ -105,9 +105,9 @@ async def create_passwordless_user( raise BadInputError("Please provide exactly one of email or phoneNumber") if email is not None and ( - isinstance(passwordless_recipe.config.contact_config, ContactEmailOnlyConfig) - or isinstance( - passwordless_recipe.config.contact_config, ContactEmailOrPhoneConfig + isinstance( + passwordless_recipe.config.contact_config, + (ContactEmailOnlyConfig, ContactEmailOrPhoneConfig), ) ): email = email.strip() @@ -120,9 +120,9 @@ async def create_passwordless_user( return CreatePasswordlessUserEmailValidationErrorResponse(validation_error) if phone_number is not None and ( - isinstance(passwordless_recipe.config.contact_config, ContactPhoneOnlyConfig) - or isinstance( - passwordless_recipe.config.contact_config, ContactEmailOrPhoneConfig + isinstance( + passwordless_recipe.config.contact_config, + (ContactPhoneOnlyConfig, ContactEmailOrPhoneConfig), ) ): validation_error = ( diff --git a/supertokens_python/recipe/dashboard/api/userroles/__init__.py b/supertokens_python/recipe/dashboard/api/userroles/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/userroles/permissions/__init__.py b/supertokens_python/recipe/dashboard/api/userroles/permissions/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py b/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py index bab61e045..726e993d5 100644 --- a/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py +++ b/supertokens_python/recipe/dashboard/api/userroles/permissions/get_permissions_for_role.py @@ -6,7 +6,6 @@ GetPermissionsForRoleOkResult, ) -from supertokens_python.recipe.userroles.recipe import UserRolesRecipe from supertokens_python.recipe.userroles.recipe import UserRolesRecipe from supertokens_python.types import APIResponse @@ -37,10 +36,10 @@ def to_json(self): async def get_permissions_for_role_api( - _api_interface: APIInterface, - _tenant_id: str, + _: APIInterface, + __: str, api_options: APIOptions, - user_context: Dict[str, Any], + ___: Dict[str, Any], ) -> Union[ OkPermissionsForRoleResponse, FeatureNotEnabledErrorResponse, diff --git a/supertokens_python/recipe/dashboard/api/userroles/roles/__init__.py b/supertokens_python/recipe/dashboard/api/userroles/roles/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py b/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py index 71dc11d21..f2bd5b353 100644 --- a/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py +++ b/supertokens_python/recipe/dashboard/api/userroles/roles/get_all_roles.py @@ -24,7 +24,7 @@ def to_json(self): async def get_all_roles_api( - _: APIInterface, __: str, api_options: APIOptions, ___: Any + _: APIInterface, __: str, ___: APIOptions, ____: Any ) -> Union[OkResponse, FeatureNotEnabledErrorResponse]: try: UserRolesRecipe.get_instance() diff --git a/supertokens_python/recipe/totp/api/__init__.py b/supertokens_python/recipe/totp/api/__init__.py new file mode 100644 index 000000000..96e37e2e6 --- /dev/null +++ b/supertokens_python/recipe/totp/api/__init__.py @@ -0,0 +1,26 @@ +# Copyright (c) 2024, VRAI Labs and/or its affiliates. All rights reserved. +# +# This software is licensed under the Apache License, Version 2.0 (the +# "License") as published by the Apache Software Foundation. +# +# You may not use this file except in compliance with the License. You may +# obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +from .create_device import handle_create_device_api +from .list_devices import handle_list_devices_api +from .remove_device import handle_remove_device_api +from .verify_device import handle_verify_device_api +from .verify_totp import handle_verify_totp_api + +__all__ = [ + "handle_create_device_api", + "handle_list_devices_api", + "handle_remove_device_api", + "handle_verify_device_api", + "handle_verify_totp_api", +] diff --git a/supertokens_python/recipe/totp/api/create_device.py b/supertokens_python/recipe/totp/api/create_device.py index 7a7ba2ef2..488fdbc1f 100644 --- a/supertokens_python/recipe/totp/api/create_device.py +++ b/supertokens_python/recipe/totp/api/create_device.py @@ -26,7 +26,7 @@ async def handle_create_device_api( - tenant_id: str, + _: str, api_implementation: APIInterface, api_options: APIOptions, user_context: Dict[str, Any], diff --git a/supertokens_python/recipe/totp/api/list_devices.py b/supertokens_python/recipe/totp/api/list_devices.py index 3030fa3a3..3c4ea8b35 100644 --- a/supertokens_python/recipe/totp/api/list_devices.py +++ b/supertokens_python/recipe/totp/api/list_devices.py @@ -24,7 +24,7 @@ async def handle_list_devices_api( - tenant_id: str, + _: str, api_implementation: APIInterface, api_options: APIOptions, user_context: Dict[str, Any], diff --git a/supertokens_python/recipe/totp/api/remove_device.py b/supertokens_python/recipe/totp/api/remove_device.py index 128424b94..b2ba5a3df 100644 --- a/supertokens_python/recipe/totp/api/remove_device.py +++ b/supertokens_python/recipe/totp/api/remove_device.py @@ -25,7 +25,7 @@ async def handle_remove_device_api( - tenant_id: str, + _: str, api_implementation: APIInterface, api_options: APIOptions, user_context: Dict[str, Any], diff --git a/supertokens_python/recipe/totp/api/verify_device.py b/supertokens_python/recipe/totp/api/verify_device.py index b57e091b1..2a93ae875 100644 --- a/supertokens_python/recipe/totp/api/verify_device.py +++ b/supertokens_python/recipe/totp/api/verify_device.py @@ -25,7 +25,7 @@ async def handle_verify_device_api( - tenant_id: str, + _: str, api_implementation: APIInterface, api_options: APIOptions, user_context: Dict[str, Any], diff --git a/supertokens_python/recipe/totp/api/verify_totp.py b/supertokens_python/recipe/totp/api/verify_totp.py index 1dbe91218..fa58eadf3 100644 --- a/supertokens_python/recipe/totp/api/verify_totp.py +++ b/supertokens_python/recipe/totp/api/verify_totp.py @@ -25,7 +25,7 @@ async def handle_verify_totp_api( - tenant_id: str, + _: str, api_implementation: APIInterface, api_options: APIOptions, user_context: Dict[str, Any], From e04c1414b1d7fa835cca31836b9785c39e5fce0d Mon Sep 17 00:00:00 2001 From: Sattvik Chakravarthy Date: Wed, 6 Nov 2024 14:59:42 +0530 Subject: [PATCH 2/2] fix: remove log file --- tests/auth-react/flask-server/server.log | 634 ----------------------- 1 file changed, 634 deletions(-) delete mode 100644 tests/auth-react/flask-server/server.log diff --git a/tests/auth-react/flask-server/server.log b/tests/auth-react/flask-server/server.log deleted file mode 100644 index 68e3b43ac..000000000 --- a/tests/auth-react/flask-server/server.log +++ /dev/null @@ -1,634 +0,0 @@ - * Serving Flask app 'app' (lazy loading) - * Environment: production - WARNING: This is a development server. Do not use it in a production deployment. - Use a production WSGI server instead. - * Debug mode: off -No SuperTokens core available to query -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 127, in try_connect - stream = await asynclib.connect_tcp(remote_host, remote_port, local_address) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1518, in connect_tcp - await get_running_loop().create_connection(StreamProtocol, host, port, - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection - raise exceptions[0] - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection - sock = await self._connect_sock( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock - await self.sock_connect(sock, address) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect - return await fut - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb - raise OSError(err, f'Connect call failed {address}') -ConnectionRefusedError: [Errno 61] Connect call failed ('127.0.0.1', 9000) - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions - yield - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp - stream: anyio.abc.ByteStream = await anyio.connect_tcp( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 184, in connect_tcp - raise OSError('All connection attempts failed') from cause -OSError: All connection attempts failed - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions - yield - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request - resp = await self._pool.handle_async_request(req) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request - raise exc - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request - response = await connection.handle_async_request(request) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request - raise exc - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request - stream = await self._connect(request) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_async/connection.py", line 111, in _connect - stream = await self._network_backend.connect_tcp(**kwargs) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp - return await self._backend.connect_tcp( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp - stream: anyio.abc.ByteStream = await anyio.connect_tcp( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/contextlib.py", line 131, in __exit__ - self.gen.throw(type, value, traceback) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions - raise to_exc(exc) -httpcore.ConnectError: All connection attempts failed - -The above exception was the direct cause of the following exception: - -Traceback (most recent call last): - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 502, in __send_request_helper - response = await http_function(url, method) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 168, in f - return await self.api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 110, in api_request - return await client.get(url, *args, **kwargs) # type: ignore - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1751, in get - return await self.request( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1527, in request - return await self.send(request, auth=auth, follow_redirects=follow_redirects) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1614, in send - response = await self._send_handling_auth( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1642, in _send_handling_auth - response = await self._send_handling_redirects( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1679, in _send_handling_redirects - response = await self._send_single_request(request) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_client.py", line 1716, in _send_single_request - response = await transport.handle_async_request(request) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request - resp = await self._pool.handle_async_request(req) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/contextlib.py", line 131, in __exit__ - self.gen.throw(type, value, traceback) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions - raise mapped_exc(message) from exc -httpx.ConnectError: All connection attempts failed - -During handling of the above exception, another exception occurred: - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe.py", line 182, in handle_api_request - return await handle_email_verify_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/api/email_verify.py", line 55, in handle_email_verify_api - result = await api_implementation.email_verify_post( - File "app.py", line 399, in email_verify_post - return await original_email_verify_post( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe.py", line 515, in email_verify_post - response = await api_options.recipe_implementation.verify_email_using_token( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe_implementation.py", line 87, in verify_email_using_token - response = await self.querier.send_post_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 343, in send_post_request - headers = await self.__get_headers_with_api_version(path, user_context) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 234, in __get_headers_with_api_version - headers = {API_VERSION_HEADER: await self.get_api_version(user_context)} - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 172, in get_api_version - response = await self.__send_request_helper( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 544, in __send_request_helper - return await self.__send_request_helper( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 477, in __send_request_helper - raise Exception("No SuperTokens core available to query") -Exception: No SuperTokens core available to query - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -SuperTokens core threw an error for a GET request to path: '/customer1/users/by-accountinfo' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/recipe.py", line 335, in handle_api_request - return await handle_sign_in_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/signin.py", line 64, in handle_sign_in_api - response = await api_implementation.sign_in_post( - File "app.py", line 505, in sign_in_post - return await original_sign_in_post( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/implementation.py", line 563, in sign_in_post - await get_authenticating_user_and_add_to_current_tenant_if_required( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/auth_utils.py", line 303, in get_authenticating_user_and_add_to_current_tenant_if_required - existing_users = await AccountLinkingRecipe.get_instance().recipe_implementation.list_users_by_account_info( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/accountlinking/recipe_implementation.py", line 344, in list_users_by_account_info - response = await self.querier.send_get_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 323, in send_get_request - return await self.__send_request_helper(path, "GET", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a GET request to path: '/customer1/users/by-accountinfo' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -SuperTokens core threw an error for a GET request to path: '/customer1/users/by-accountinfo' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/recipe.py", line 339, in handle_api_request - return await handle_email_exists_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/email_exists.py", line 40, in handle_email_exists_api - response = await api_implementation.email_exists_get( - File "app.py", line 451, in email_exists_get - return await original_email_exists_get( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/implementation.py", line 83, in email_exists_get - users = await AccountLinkingRecipe.get_instance().recipe_implementation.list_users_by_account_info( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/accountlinking/recipe_implementation.py", line 344, in list_users_by_account_info - response = await self.querier.send_get_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 323, in send_get_request - return await self.__send_request_helper(path, "GET", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a GET request to path: '/customer1/users/by-accountinfo' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -Tenant not found error. -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/recipe.py", line 331, in handle_api_request - return await handle_sign_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/signup.py", line 73, in handle_sign_up_api - response = await api_implementation.sign_up_post( - File "app.py", line 527, in sign_up_post - return await original_sign_up_post( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/implementation.py", line 682, in sign_up_post - pre_auth_check_res = await pre_auth_checks( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/auth_utils.py", line 128, in pre_auth_checks - await filter_out_invalid_first_factors_or_throw_if_all_are_invalid( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/auth_utils.py", line 876, in filter_out_invalid_first_factors_or_throw_if_all_are_invalid - raise Exception("Tenant not found error.") -Exception: Tenant not found error. - -Tenant not found -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/recipe.py", line 132, in handle_api_request - return await handle_login_methods_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/login_methods.py", line 35, in handle_login_methods_api - result = await api_implementation.login_methods_get( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/implementation.py", line 56, in login_methods_get - raise Exception("Tenant not found") -Exception: Tenant not found - -Tenant not found -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/recipe.py", line 132, in handle_api_request - return await handle_login_methods_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/login_methods.py", line 35, in handle_login_methods_api - result = await api_implementation.login_methods_get( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/implementation.py", line 56, in login_methods_get - raise Exception("Tenant not found") -Exception: Tenant not found - -SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request - rv = self.dispatch_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/framework/flask/__init__.py", line 75, in wrapped_function - response = f(*args, **kwargs) - File "app.py", line 1279, in get_session_info - "sessionDataFromDatabase": session_.sync_get_session_data_from_database(), - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/interfaces.py", line 604, in sync_get_session_data_from_database - return sync(self.get_session_data_from_database(user_context)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_class.py", line 113, in get_session_data_from_database - session_info = await self.recipe_implementation.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/recipe_implementation.py", line 373, in get_session_information - return await session_functions.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_functions.py", line 550, in get_session_information - response = await recipe_implementation.querier.send_get_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 323, in send_get_request - return await self.__send_request_helper(path, "GET", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request - rv = self.dispatch_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/framework/flask/__init__.py", line 75, in wrapped_function - response = f(*args, **kwargs) - File "app.py", line 1279, in get_session_info - "sessionDataFromDatabase": session_.sync_get_session_data_from_database(), - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/interfaces.py", line 604, in sync_get_session_data_from_database - return sync(self.get_session_data_from_database(user_context)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_class.py", line 113, in get_session_data_from_database - session_info = await self.recipe_implementation.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/recipe_implementation.py", line 373, in get_session_information - return await session_functions.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_functions.py", line 550, in get_session_information - response = await recipe_implementation.querier.send_get_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 323, in send_get_request - return await self.__send_request_helper(path, "GET", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request - rv = self.dispatch_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request - return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/framework/flask/__init__.py", line 75, in wrapped_function - response = f(*args, **kwargs) - File "app.py", line 1279, in get_session_info - "sessionDataFromDatabase": session_.sync_get_session_data_from_database(), - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/interfaces.py", line 604, in sync_get_session_data_from_database - return sync(self.get_session_data_from_database(user_context)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_class.py", line 113, in get_session_data_from_database - session_info = await self.recipe_implementation.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/recipe_implementation.py", line 373, in get_session_information - return await session_functions.get_session_information( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/session/session_functions.py", line 550, in get_session_information - response = await recipe_implementation.querier.send_get_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 323, in send_get_request - return await self.__send_request_helper(path, "GET", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a GET request to path: '/recipe/session' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -Tenant not found -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/recipe.py", line 132, in handle_api_request - return await handle_login_methods_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/login_methods.py", line 35, in handle_login_methods_api - result = await api_implementation.login_methods_get( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/multitenancy/api/implementation.py", line 56, in login_methods_get - raise Exception("Tenant not found") -Exception: Tenant not found - -SuperTokens core threw an error for a POST request to path: '/customer1/recipe/user/password/reset/token/consume' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/recipe.py", line 347, in handle_api_request - return await handle_password_reset_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/password_reset.py", line 63, in handle_password_reset_api - response = await api_implementation.password_reset_post( - File "app.py", line 484, in password_reset_post - return await original_password_reset_post( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/api/implementation.py", line 414, in password_reset_post - await api_options.recipe_implementation.consume_password_reset_token( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailpassword/recipe_implementation.py", line 224, in consume_password_reset_token - response = await self.querier.send_post_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 366, in send_post_request - return await self.__send_request_helper(path, "POST", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a POST request to path: '/customer1/recipe/user/password/reset/token/consume' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -SuperTokens core threw an error for a POST request to path: '/customer1/recipe/user/email/verify' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe.py", line 182, in handle_api_request - return await handle_email_verify_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/api/email_verify.py", line 55, in handle_email_verify_api - result = await api_implementation.email_verify_post( - File "app.py", line 399, in email_verify_post - return await original_email_verify_post( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe.py", line 515, in email_verify_post - response = await api_options.recipe_implementation.verify_email_using_token( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/emailverification/recipe_implementation.py", line 87, in verify_email_using_token - response = await self.querier.send_post_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 366, in send_post_request - return await self.__send_request_helper(path, "POST", f, len(self.__hosts)) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/querier.py", line 523, in __send_request_helper - raise Exception( -Exception: SuperTokens core threw an error for a POST request to path: '/customer1/recipe/user/email/verify' with status code: 400 and message: AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, customer1) - - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -Object of type ThirdPartyInfo is not JSON serializable -Traceback (most recent call last): - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1514, in full_dispatch_request - rv = self.preprocess_request() - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/site-packages/flask/app.py", line 1857, in preprocess_request - rv = self.ensure_sync(before_func)() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_middleware.py", line 56, in _ - result: Union[BaseResponse, None] = sync( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/async_to_sync_wrapper.py", line 45, in sync - return loop.run_until_complete(co) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete - return future.result() - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/supertokens.py", line 613, in middleware - request_handled = await final_matched_recipe.handle_api_request( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/recipe.py", line 137, in handle_api_request - return await handle_sign_in_up_api( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/recipe/thirdparty/api/signinup.py", line 116, in handle_sign_in_up_api - return send_200_response( - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/utils.py", line 160, in send_200_response - response.set_json_content(data_json) - File "/Users/sattvik/projects/supertokens/supertokens-python/supertokens_python/framework/flask/flask_response.py", line 80, in set_json_content - self.response.data = json.dumps( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/__init__.py", line 234, in dumps - return cls( - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 199, in encode - chunks = self.iterencode(o, _one_shot=True) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 257, in iterencode - return _iterencode(o, 0) - File "/Users/sattvik/miniconda3/envs/st/lib/python3.8/json/encoder.py", line 179, in default - raise TypeError(f'Object of type {o.__class__.__name__} ' -TypeError: Object of type ThirdPartyInfo is not JSON serializable - -Object of type ThirdPartyInfo is not JSON serializable