Skip to content

Commit

Permalink
Revert "prune TODO for next PR"
Browse files Browse the repository at this point in the history
This reverts commit 0f522a3.
  • Loading branch information
pcrespov committed Nov 25, 2022
1 parent 491a354 commit 51a6df3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def login(request: web.Request):
"code": LOGIN_CODE_PHONE_NUMBER_REQUIRED,
"reason": "To login, please register first a phone number",
},
status=web.HTTPAccepted.status_code,
status=web.HTTPAccepted.status_code, # FIXME: error instead?? front-end needs to show a reg
)
return rsp

Expand Down Expand Up @@ -160,6 +160,7 @@ async def login_2fa(request: web.Request):
reason=cfg.MSG_WRONG_2FA_CODE, content_type=MIMETYPE_APPLICATION_JSON
)

# FIXME: ask to register if user not found!!
user = await db.get_user({"email": email})

# dispose since used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

def _get_user_name(email: str) -> str:
username = email.split("@")[0]
# TODO: this has to be unique and add this in user registration!
return username


Expand Down Expand Up @@ -86,7 +87,7 @@ async def register(request: web.Request):
),
"role": USER,
"expires_at": expires_at,
"created_ip": get_client_ip(request),
"created_ip": get_client_ip(request), # FIXME: does not get right IP!
}
)

Expand Down

0 comments on commit 51a6df3

Please sign in to comment.