From 94791b271ca0fd281fc35c98491c80194345642f Mon Sep 17 00:00:00 2001 From: KShivendu Date: Wed, 23 Aug 2023 14:15:46 +0530 Subject: [PATCH] fix: Thirdparty providers bitbucket, boxy, and fb --- CHANGELOG.md | 4 ++++ setup.py | 2 +- supertokens_python/constants.py | 2 +- .../recipe/thirdparty/providers/bitbucket.py | 2 +- .../recipe/thirdparty/providers/boxy_saml.py | 12 ++++++------ .../recipe/thirdparty/providers/facebook.py | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af824a32..07c29d3b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.15.2] - 2023-09-23 + +- Fixed bugs in thirdparty providers: Bitbucket, Boxy-SAML, and Facebook + ## [0.15.1] - 2023-09-22 - Fixes name of passwordless recipe function from `passwordlessSigninup` to `passwordless_signinup` diff --git a/setup.py b/setup.py index a514bd9f7..10235f763 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( name="supertokens_python", - version="0.15.1", + version="0.15.2", author="SuperTokens", license="Apache 2.0", author_email="team@supertokens.com", diff --git a/supertokens_python/constants.py b/supertokens_python/constants.py index b3ae2c8c8..4a9ae70bb 100644 --- a/supertokens_python/constants.py +++ b/supertokens_python/constants.py @@ -14,7 +14,7 @@ from __future__ import annotations SUPPORTED_CDI_VERSIONS = ["3.0"] -VERSION = "0.15.1" +VERSION = "0.15.2" TELEMETRY = "/telemetry" USER_COUNT = "/users/count" USER_DELETE = "/user/remove" diff --git a/supertokens_python/recipe/thirdparty/providers/bitbucket.py b/supertokens_python/recipe/thirdparty/providers/bitbucket.py index 525e45a47..45c891d06 100644 --- a/supertokens_python/recipe/thirdparty/providers/bitbucket.py +++ b/supertokens_python/recipe/thirdparty/providers/bitbucket.py @@ -77,7 +77,7 @@ async def get_user_info( email = None is_verified = False - for email_info in user_info_from_email.values(): + for email_info in user_info_from_email["values"]: if email_info["is_primary"]: email = email_info["email"] is_verified = email_info["is_confirmed"] diff --git a/supertokens_python/recipe/thirdparty/providers/boxy_saml.py b/supertokens_python/recipe/thirdparty/providers/boxy_saml.py index 05541ee8b..db205f477 100644 --- a/supertokens_python/recipe/thirdparty/providers/boxy_saml.py +++ b/supertokens_python/recipe/thirdparty/providers/boxy_saml.py @@ -56,13 +56,13 @@ def BoxySAML(input: ProviderInput) -> Provider: # pylint: disable=redefined-bui if input.config.user_info_map is None: input.config.user_info_map = UserInfoMap(UserFields(), UserFields()) - if input.config.user_info_map.from_id_token_payload is None: - input.config.user_info_map.from_id_token_payload = UserFields() + if input.config.user_info_map.from_user_info_api is None: + input.config.user_info_map.from_user_info_api = UserFields() - if input.config.user_info_map.from_id_token_payload.user_id is None: - input.config.user_info_map.from_id_token_payload.user_id = "id" + if input.config.user_info_map.from_user_info_api.user_id is None: + input.config.user_info_map.from_user_info_api.user_id = "id" - if input.config.user_info_map.from_id_token_payload.email is None: - input.config.user_info_map.from_id_token_payload.email = "email" + if input.config.user_info_map.from_user_info_api.email is None: + input.config.user_info_map.from_user_info_api.email = "email" return NewProvider(input, BoxySAMLImpl) diff --git a/supertokens_python/recipe/thirdparty/providers/facebook.py b/supertokens_python/recipe/thirdparty/providers/facebook.py index 983bf58c5..439352c89 100644 --- a/supertokens_python/recipe/thirdparty/providers/facebook.py +++ b/supertokens_python/recipe/thirdparty/providers/facebook.py @@ -37,7 +37,7 @@ async def get_config_for_client_type( config = await super().get_config_for_client_type(client_type, user_context) if config.scope is None: - config.scope = ["identify", "email"] + config.scope = ["email"] return config