Skip to content

Commit

Permalink
Merge pull request #427 from supertokens/fix/tp-providers
Browse files Browse the repository at this point in the history
fix: Thirdparty providers bitbucket, boxy, and fb
  • Loading branch information
rishabhpoddar authored Aug 23, 2023
2 parents 5814a00 + 94791b2 commit ac9ce7e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

setup(
name="supertokens_python",
version="0.15.1",
version="0.15.2",
author="SuperTokens",
license="Apache 2.0",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion supertokens_python/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
12 changes: 6 additions & 6 deletions supertokens_python/recipe/thirdparty/providers/boxy_saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion supertokens_python/recipe/thirdparty/providers/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ac9ce7e

Please sign in to comment.