Skip to content

Commit

Permalink
fix: Twitter provider signup issue
Browse files Browse the repository at this point in the history
  • Loading branch information
KShivendu committed Sep 22, 2023
1 parent b20d8ab commit ead8406
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions supertokens_python/recipe/thirdparty/api/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ async def sign_in_up_post(
)

if user_info.email is None and provider.config.require_email is False:
# We don't expect to get an email from this provider.
# So we generate a fake one
if provider.config.generate_fake_email is not None:
user_info.email = UserInfoEmail(
email=await provider.config.generate_fake_email(
Expand Down
2 changes: 1 addition & 1 deletion supertokens_python/recipe/thirdparty/providers/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def Twitter(input: ProviderInput) -> Provider: # pylint: disable=redefined-buil
input.config.user_info_endpoint = "https://api.twitter.com/2/users/me"

if input.config.require_email is None:
input.config.require_email = True
input.config.require_email = False

if input.config.user_info_map is None:
input.config.user_info_map = UserInfoMap(UserFields(), UserFields())
Expand Down

0 comments on commit ead8406

Please sign in to comment.