Skip to content

Commit

Permalink
Merge pull request #124 from Macktireh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Macktireh authored Aug 3, 2024
2 parents 1e7cf8d + 2c7e132 commit f00ecca
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apps/authentication/social_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def register_user_with_social_account(auth_provider, email, first_name, last_nam
print()
print("register_user_with_social_account", auth_provider, email, first_name, last_name)
print()
user, created = User.objects.get_or_create(
email=email,
first_name=first_name,
last_name=last_name,
auth_provider=auth_provider,
)
# try:
# except Exception:
# raise AuthenticationFailed("Something went wrong. Please try again later.")
try:
user, created = User.objects.get_or_create(
email=email,
first_name=first_name,
last_name=last_name,
auth_provider=auth_provider,
)
except Exception:
raise AuthenticationFailed(f"Get OR Create User: {email} {first_name} {last_name} {auth_provider}.")

if created:
user.is_verified_email = True
Expand Down

0 comments on commit f00ecca

Please sign in to comment.