diff --git a/.circleci/config.yml b/.circleci/config.yml index 5c79bb1cf..c37c6a10d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ orbs: jobs: create-test-jobs: machine: - image: ubuntu-2204:2022.04.1 + image: ubuntu-2204:2024.04.4 steps: - checkout - run: diff --git a/.github/workflows/pre-commit-hook-run.yml b/.github/workflows/pre-commit-hook-run.yml index a93db8cad..0c25a22bf 100644 --- a/.github/workflows/pre-commit-hook-run.yml +++ b/.github/workflows/pre-commit-hook-run.yml @@ -14,10 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up node - uses: actions/setup-node@v1 + - uses: actions/setup-python@v5 with: - node-version: '12' + python-version: '3.7' - name: Create virtual environment and install dependencies run: | python3 -m venv venv diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a323aeb96 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:latest +RUN apt-get update && apt-get install -y python3 python3-pip python3-venv +ADD . /app +WORKDIR /app +RUN bash ./test-pre-commit.sh +RUN bash ./hooks/pre-commit.sh diff --git a/Makefile b/Makefile index 100335466..f9afc228e 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ format: black . check-lint: - pyright supertokens_python tests examples && pylint --disable=too-many-positional-arguments --load-plugins=pylint.extensions.no_self_use supertokens_python tests examples + pyright supertokens_python tests examples && pylint supertokens_python tests examples set-up-hooks: cp hooks/pre-commit.sh .git/hooks/pre-commit diff --git a/dev-requirements.txt b/dev-requirements.txt index d4d69cc11..7c0d82388 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,7 @@ aiosmtplib>=1.1.6,<4.0.0 anyio==3.5.0 asgiref==3.5.2 +astroid==2.9.3 attrs==21.4.0 black==22.3.0 certifi==2021.10.8 @@ -50,7 +51,7 @@ pycparser==2.21 pycryptodome==3.10.4 pydantic==1.9.0 PyJWT==2.6.0 -pylint==3.3.1 +pylint==2.12.2 pyparsing==3.0.7 pyright==1.1.236 pyrsistent==0.18.1 diff --git a/html/supertokens_python/asyncio/index.html b/html/supertokens_python/asyncio/index.html index 176740f64..f720f0adb 100644 --- a/html/supertokens_python/asyncio/index.html +++ b/html/supertokens_python/asyncio/index.html @@ -213,7 +213,7 @@

Functions

-async def delete_user_id_mapping(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> DeleteUserIdMappingOkResult +async def delete_user_id_mapping(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> DeleteUserIdMappingOkResult
@@ -252,7 +252,7 @@

Functions

-async def get_user_id_mapping(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[GetUserIdMappingOkResultUnknownMappingError] +async def get_user_id_mapping(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[GetUserIdMappingOkResultUnknownMappingError]
@@ -327,7 +327,7 @@

Functions

-async def update_or_delete_user_id_mapping_info(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[UpdateOrDeleteUserIdMappingInfoOkResultUnknownMappingError] +async def update_or_delete_user_id_mapping_info(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[UpdateOrDeleteUserIdMappingInfoOkResultUnknownMappingError]
diff --git a/html/supertokens_python/constants.html b/html/supertokens_python/constants.html index 102b464af..19bafcb1c 100644 --- a/html/supertokens_python/constants.html +++ b/html/supertokens_python/constants.html @@ -42,7 +42,7 @@

Module supertokens_python.constants

from __future__ import annotations SUPPORTED_CDI_VERSIONS = ["3.0"] -VERSION = "0.24.3" +VERSION = "0.24.4" TELEMETRY = "/telemetry" USER_COUNT = "/users/count" USER_DELETE = "/user/remove" diff --git a/html/supertokens_python/index.html b/html/supertokens_python/index.html index 5caaefc02..613c7fdea 100644 --- a/html/supertokens_python/index.html +++ b/html/supertokens_python/index.html @@ -194,7 +194,7 @@

Functions

-def init(app_info: InputAppInfo, framework: Literal['fastapi', 'flask', 'django'], supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: Optional[Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None) +def init(app_info: InputAppInfo, framework: typing_extensions.Literal['fastapi', 'flask', 'django'], supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: Optional[typing_extensions.Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None)
diff --git a/html/supertokens_python/ingredients/emaildelivery/types.html b/html/supertokens_python/ingredients/emaildelivery/types.html index 083c72459..62070f722 100644 --- a/html/supertokens_python/ingredients/emaildelivery/types.html +++ b/html/supertokens_python/ingredients/emaildelivery/types.html @@ -214,6 +214,7 @@

Ancestors

class EmailDeliveryInterface +(*args, **kwds)

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/ingredients/smsdelivery/types.html b/html/supertokens_python/ingredients/smsdelivery/types.html index ee47376d6..f6f21d7aa 100644 --- a/html/supertokens_python/ingredients/smsdelivery/types.html +++ b/html/supertokens_python/ingredients/smsdelivery/types.html @@ -210,6 +210,7 @@

Ancestors

class SMSDeliveryInterface +(*args, **kwds)

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/recipe/passwordless/index.html b/html/supertokens_python/recipe/passwordless/index.html index 119cb7a2b..815de9276 100644 --- a/html/supertokens_python/recipe/passwordless/index.html +++ b/html/supertokens_python/recipe/passwordless/index.html @@ -160,7 +160,7 @@

Sub-modules

Functions

-def init(contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule] +def init(contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule]
diff --git a/html/supertokens_python/recipe/passwordless/interfaces.html b/html/supertokens_python/recipe/passwordless/interfaces.html index fe1f43f2b..3aeb128a2 100644 --- a/html/supertokens_python/recipe/passwordless/interfaces.html +++ b/html/supertokens_python/recipe/passwordless/interfaces.html @@ -1089,7 +1089,7 @@

Methods

class CreateCodePostOkResult -(device_id: str, pre_auth_session_id: str, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']") +(device_id: str, pre_auth_session_id: str, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]")

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/recipe/passwordless/recipe.html b/html/supertokens_python/recipe/passwordless/recipe.html index 05ac749b2..e044eadeb 100644 --- a/html/supertokens_python/recipe/passwordless/recipe.html +++ b/html/supertokens_python/recipe/passwordless/recipe.html @@ -425,7 +425,7 @@

Classes

class PasswordlessRecipe -(recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) +(recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)

Helper class that provides a standard way to create an ABC using @@ -785,7 +785,7 @@

Static methods

-def init(contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) +def init(contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)
diff --git a/html/supertokens_python/recipe/passwordless/utils.html b/html/supertokens_python/recipe/passwordless/utils.html index 1d3a65ab8..5dae5907f 100644 --- a/html/supertokens_python/recipe/passwordless/utils.html +++ b/html/supertokens_python/recipe/passwordless/utils.html @@ -311,7 +311,7 @@

Functions

-def validate_and_normalise_user_input(app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> PasswordlessConfig +def validate_and_normalise_user_input(app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> PasswordlessConfig
@@ -402,7 +402,7 @@

Classes

class ContactConfig -(contact_method: "Literal['PHONE', 'EMAIL', 'EMAIL_OR_PHONE']") +(contact_method: "Literal[('PHONE', 'EMAIL', 'EMAIL_OR_PHONE')]")

Helper class that provides a standard way to create an ABC using @@ -549,7 +549,7 @@

Ancestors

class PasswordlessConfig -(contact_config: ContactConfig, override: OverrideConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None) +(contact_config: ContactConfig, override: OverrideConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None)
diff --git a/html/supertokens_python/recipe/session/access_token.html b/html/supertokens_python/recipe/session/access_token.html index d44536fcd..017fffd36 100644 --- a/html/supertokens_python/recipe/session/access_token.html +++ b/html/supertokens_python/recipe/session/access_token.html @@ -312,7 +312,7 @@

Functions

-def sanitize_number(n: Any) ‑> Union[int, float, ForwardRef(None)] +def sanitize_number(n: Any) ‑> Union[int, float, None]
diff --git a/html/supertokens_python/recipe/session/claim_base_classes/boolean_claim.html b/html/supertokens_python/recipe/session/claim_base_classes/boolean_claim.html index b7613f194..d82c5e358 100644 --- a/html/supertokens_python/recipe/session/claim_base_classes/boolean_claim.html +++ b/html/supertokens_python/recipe/session/claim_base_classes/boolean_claim.html @@ -81,7 +81,7 @@

Classes

class BooleanClaim -(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[bool]], bool, ForwardRef(None)]], default_max_age_in_sec: Optional[int] = None) +(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[bool]], bool, None]], default_max_age_in_sec: Optional[int] = None)

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/recipe/session/claim_base_classes/primitive_array_claim.html b/html/supertokens_python/recipe/session/claim_base_classes/primitive_array_claim.html index 6a5230983..0a86d37c1 100644 --- a/html/supertokens_python/recipe/session/claim_base_classes/primitive_array_claim.html +++ b/html/supertokens_python/recipe/session/claim_base_classes/primitive_array_claim.html @@ -593,7 +593,7 @@

Methods

class PrimitiveArrayClaim -(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~PrimitiveList]], ~PrimitiveList, ForwardRef(None)]], default_max_age_in_sec: Optional[int] = None) +(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~PrimitiveList]], ~PrimitiveList, None]], default_max_age_in_sec: Optional[int] = None)

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/recipe/session/claim_base_classes/primitive_claim.html b/html/supertokens_python/recipe/session/claim_base_classes/primitive_claim.html index a580cbf7e..0d8d4593f 100644 --- a/html/supertokens_python/recipe/session/claim_base_classes/primitive_claim.html +++ b/html/supertokens_python/recipe/session/claim_base_classes/primitive_claim.html @@ -400,7 +400,7 @@

Methods

class PrimitiveClaim -(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~Primitive]], ~Primitive, ForwardRef(None)]], default_max_age_in_sec: Optional[int] = None) +(key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~Primitive]], ~Primitive, None]], default_max_age_in_sec: Optional[int] = None)

Helper class that provides a standard way to create an ABC using diff --git a/html/supertokens_python/recipe/session/cookie_and_header.html b/html/supertokens_python/recipe/session/cookie_and_header.html index b52ce8139..1053c9b83 100644 --- a/html/supertokens_python/recipe/session/cookie_and_header.html +++ b/html/supertokens_python/recipe/session/cookie_and_header.html @@ -907,7 +907,7 @@

Functions

diff --git a/html/supertokens_python/recipe/session/index.html b/html/supertokens_python/recipe/session/index.html index 022af4972..f00f4525a 100644 --- a/html/supertokens_python/recipe/session/index.html +++ b/html/supertokens_python/recipe/session/index.html @@ -185,7 +185,7 @@

Sub-modules

Functions

-def init(cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal['lax', 'none', 'strict'], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal['VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE'], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None) ‑> Callable[[AppInfo], RecipeModule] +def init(cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal[('lax', 'none', 'strict')], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal[('VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE')], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None) ‑> Callable[[AppInfo], RecipeModule]
diff --git a/html/supertokens_python/recipe/session/recipe.html b/html/supertokens_python/recipe/session/recipe.html index c478a829f..831a701e2 100644 --- a/html/supertokens_python/recipe/session/recipe.html +++ b/html/supertokens_python/recipe/session/recipe.html @@ -446,7 +446,7 @@

Classes

class SessionRecipe -(recipe_id: str, app_info: AppInfo, cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal['lax', 'none', 'strict'], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal['VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE'], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None) +(recipe_id: str, app_info: AppInfo, cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal[('lax', 'none', 'strict')], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal[('VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE')], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None)

Helper class that provides a standard way to create an ABC using @@ -834,7 +834,7 @@

Static methods

-def init(cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal['lax', 'none', 'strict'], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal['VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE'], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None) +def init(cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal[('lax', 'none', 'strict')], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal[('VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE')], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[InputErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None)
diff --git a/html/supertokens_python/recipe/session/session_class.html b/html/supertokens_python/recipe/session/session_class.html index 95eb665c4..5f900c5c0 100644 --- a/html/supertokens_python/recipe/session/session_class.html +++ b/html/supertokens_python/recipe/session/session_class.html @@ -723,7 +723,7 @@

Methods

-async def attach_to_request_response(self, request: BaseRequest, transfer_method: Literal['cookie', 'header'], user_context: Optional[Dict[str, Any]]) ‑> None +async def attach_to_request_response(self, request: BaseRequest, transfer_method: typing_extensions.Literal['cookie', 'header'], user_context: Optional[Dict[str, Any]]) ‑> None
diff --git a/html/supertokens_python/recipe/session/utils.html b/html/supertokens_python/recipe/session/utils.html index 8b0773bfc..cb890cf47 100644 --- a/html/supertokens_python/recipe/session/utils.html +++ b/html/supertokens_python/recipe/session/utils.html @@ -861,7 +861,7 @@

Functions

-def normalise_same_site(same_site: str) ‑> Literal['strict', 'lax', 'none'] +def normalise_same_site(same_site: str) ‑> typing_extensions.Literal['strict', 'lax', 'none']
@@ -918,7 +918,7 @@

Functions

-def validate_and_normalise_user_input(app_info: AppInfo, cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal['lax', 'strict', 'none'], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal['VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE'], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[ErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None) +def validate_and_normalise_user_input(app_info: AppInfo, cookie_domain: Union[str, None] = None, older_cookie_domain: Union[str, None] = None, cookie_secure: Union[bool, None] = None, cookie_same_site: "Union[Literal[('lax', 'strict', 'none')], None]" = None, session_expired_status_code: Union[int, None] = None, anti_csrf: "Union[Literal[('VIA_TOKEN', 'VIA_CUSTOM_HEADER', 'NONE')], None]" = None, get_token_transfer_method: "Union[Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]], None]" = None, error_handlers: Union[ErrorHandlers, None] = None, override: Union[InputOverrideConfig, None] = None, invalid_claim_status_code: Union[int, None] = None, use_dynamic_access_token_signing_key: Union[bool, None] = None, expose_access_token_to_frontend_in_cookie_based_auth: Union[bool, None] = None, jwks_refresh_interval_sec: Union[int, None] = None)
@@ -1428,7 +1428,7 @@

Ancestors

class SessionConfig -(refresh_token_path: NormalisedURLPath, cookie_domain: Union[None, str], older_cookie_domain: Union[None, str], get_cookie_same_site: "Callable[[Optional[BaseRequest], Dict[str, Any]], Literal['lax', 'strict', 'none']]", cookie_secure: bool, session_expired_status_code: int, error_handlers: ErrorHandlers, anti_csrf_function_or_string: "Union[Callable[[Optional[BaseRequest], Dict[str, Any]], Literal['VIA_CUSTOM_HEADER', 'NONE']], Literal['VIA_CUSTOM_HEADER', 'NONE', 'VIA_TOKEN']]", get_token_transfer_method: "Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]]", override: OverrideConfig, framework: str, mode: str, invalid_claim_status_code: int, use_dynamic_access_token_signing_key: bool, expose_access_token_to_frontend_in_cookie_based_auth: bool, jwks_refresh_interval_sec: int) +(refresh_token_path: NormalisedURLPath, cookie_domain: Union[None, str], older_cookie_domain: Union[None, str], get_cookie_same_site: "Callable[[Optional[BaseRequest], Dict[str, Any]], Literal[('lax', 'strict', 'none')]]", cookie_secure: bool, session_expired_status_code: int, error_handlers: ErrorHandlers, anti_csrf_function_or_string: "Union[Callable[[Optional[BaseRequest], Dict[str, Any]], Literal[('VIA_CUSTOM_HEADER', 'NONE')]], Literal[('VIA_CUSTOM_HEADER', 'NONE', 'VIA_TOKEN')]]", get_token_transfer_method: "Callable[[BaseRequest, bool, Dict[str, Any]], Union[TokenTransferMethod, Literal['any']]]", override: OverrideConfig, framework: str, mode: str, invalid_claim_status_code: int, use_dynamic_access_token_signing_key: bool, expose_access_token_to_frontend_in_cookie_based_auth: bool, jwks_refresh_interval_sec: int)
diff --git a/html/supertokens_python/recipe_module.html b/html/supertokens_python/recipe_module.html index 0245fac92..f91df4351 100644 --- a/html/supertokens_python/recipe_module.html +++ b/html/supertokens_python/recipe_module.html @@ -187,7 +187,7 @@

Classes

class APIHandled -(path_without_api_base_path: NormalisedURLPath, method: "Literal['post', 'get', 'delete', 'put', 'options', 'trace']", request_id: str, disabled: bool) +(path_without_api_base_path: NormalisedURLPath, method: "Literal[('post', 'get', 'delete', 'put', 'options', 'trace')]", request_id: str, disabled: bool)
diff --git a/html/supertokens_python/supertokens.html b/html/supertokens_python/supertokens.html index 980b644aa..1956fd8d7 100644 --- a/html/supertokens_python/supertokens.html +++ b/html/supertokens_python/supertokens.html @@ -820,7 +820,7 @@

Classes

class AppInfo -(app_name: str, api_domain: str, website_domain: Optional[str], framework: "Literal['fastapi', 'flask', 'django']", api_gateway_path: str, api_base_path: str, website_base_path: str, mode: "Union[Literal['asgi', 'wsgi'], None]", origin: Optional[Union[str, Callable[[Optional[BaseRequest], Dict[str, Any]], str]]]) +(app_name: str, api_domain: str, website_domain: Optional[str], framework: "Literal[('fastapi', 'flask', 'django')]", api_gateway_path: str, api_base_path: str, website_base_path: str, mode: "Union[Literal[('asgi', 'wsgi')], None]", origin: Optional[Union[str, Callable[[Optional[BaseRequest], Dict[str, Any]], str]]])
@@ -1010,7 +1010,7 @@

Methods

class Supertokens -(app_info: InputAppInfo, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool], debug: Optional[bool]) +(app_info: InputAppInfo, framework: "Literal[('fastapi', 'flask', 'django')]", supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: "Optional[Literal[('asgi', 'wsgi')]]", telemetry: Optional[bool], debug: Optional[bool])
@@ -1578,7 +1578,7 @@

Static methods

-def init(app_info: InputAppInfo, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool], debug: Optional[bool]) +def init(app_info: InputAppInfo, framework: "Literal[('fastapi', 'flask', 'django')]", supertokens_config: SupertokensConfig, recipe_list: List[Callable[[AppInfo], RecipeModule]], mode: "Optional[Literal[('asgi', 'wsgi')]]", telemetry: Optional[bool], debug: Optional[bool])
@@ -1877,7 +1877,7 @@

Methods

-async def get_users(self, tenant_id: str, time_joined_order: "Literal['ASC', 'DESC']", limit: Union[int, None], pagination_token: Union[str, None], include_recipe_ids: Union[None, List[str]], query: Union[Dict[str, str], None], user_context: Optional[Dict[str, Any]]) ‑> UsersResponse +async def get_users(self, tenant_id: str, time_joined_order: "Literal[('ASC', 'DESC')]", limit: Union[int, None], pagination_token: Union[str, None], include_recipe_ids: Union[None, List[str]], query: Union[Dict[str, str], None], user_context: Optional[Dict[str, Any]]) ‑> UsersResponse
diff --git a/html/supertokens_python/syncio/index.html b/html/supertokens_python/syncio/index.html index 36dd503ce..bc507633f 100644 --- a/html/supertokens_python/syncio/index.html +++ b/html/supertokens_python/syncio/index.html @@ -226,7 +226,7 @@

Functions

-def delete_user_id_mapping(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> DeleteUserIdMappingOkResult +def delete_user_id_mapping(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, force: Optional[bool] = None, user_context: Optional[Dict[str, Any]] = None) ‑> DeleteUserIdMappingOkResult
@@ -269,7 +269,7 @@

Functions

-def get_user_id_mapping(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[GetUserIdMappingOkResultUnknownMappingError] +def get_user_id_mapping(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[GetUserIdMappingOkResultUnknownMappingError]
@@ -350,7 +350,7 @@

Functions

-def update_or_delete_user_id_mapping_info(user_id: str, user_id_type: Optional[Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[UpdateOrDeleteUserIdMappingInfoOkResultUnknownMappingError] +def update_or_delete_user_id_mapping_info(user_id: str, user_id_type: Optional[typing_extensions.Literal['SUPERTOKENS', 'EXTERNAL', 'ANY']] = None, external_user_id_info: Optional[str] = None, user_context: Optional[Dict[str, Any]] = None) ‑> Union[UpdateOrDeleteUserIdMappingInfoOkResultUnknownMappingError]
diff --git a/test-pre-commit.sh b/test-pre-commit.sh deleted file mode 100644 index a4236b052..000000000 --- a/test-pre-commit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -python3 -m venv venv -source venv/bin/activate -pip3 install "cython<3.0.0" wheel -pip3 install "PyYAML==5.4.1" --no-build-isolation -make dev-install && rm -rf src