Skip to content

Commit

Permalink
fixes bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Sep 30, 2024
1 parent 12a624c commit d31a8fb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions supertokens_python/recipe/passwordless/api/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,11 @@ async def create_code_post(

if not isinstance(pre_auth_checks_result, OkResponse):
if isinstance(pre_auth_checks_result, SignUpNotAllowedResponse):
reason = error_code_map["SIGN_IN_NOT_ALLOWED"]
reason = error_code_map["SIGN_UP_NOT_ALLOWED"]
assert isinstance(reason, str)
return SignInUpPostNotAllowedResponse(reason)
if isinstance(pre_auth_checks_result, SignInNotAllowedResponse):
reason = error_code_map["SIGN_IN_NOT_ALLOWED"]
assert isinstance(reason, str)
return SignInUpPostNotAllowedResponse(reason)
raise Exception("Should never come here")

reason_dict = error_code_map["LINKING_TO_SESSION_USER_FAILED"]
assert isinstance(reason_dict, Dict)
Expand Down

0 comments on commit d31a8fb

Please sign in to comment.