diff --git a/services/web/server/src/simcore_service_webserver/login/handlers.py b/services/web/server/src/simcore_service_webserver/login/handlers.py index e9800f7af2b2..d625eae96046 100644 --- a/services/web/server/src/simcore_service_webserver/login/handlers.py +++ b/services/web/server/src/simcore_service_webserver/login/handlers.py @@ -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 @@ -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 diff --git a/services/web/server/src/simcore_service_webserver/login/handlers_registration.py b/services/web/server/src/simcore_service_webserver/login/handlers_registration.py index 2a426802488e..cba3c7e22acd 100644 --- a/services/web/server/src/simcore_service_webserver/login/handlers_registration.py +++ b/services/web/server/src/simcore_service_webserver/login/handlers_registration.py @@ -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 @@ -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! } )