From 653dcb0a149054fb1b9f3c4fb825446e85aa3c50 Mon Sep 17 00:00:00 2001 From: spsaefan <117728614+spsaefan@users.noreply.github.com> Date: Fri, 26 Jun 2026 00:27:58 +0200 Subject: [PATCH] Log OTK code for development testing --- service/src/main/inse/auth/service.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/service/src/main/inse/auth/service.py b/service/src/main/inse/auth/service.py index 14da4395..3c390c8c 100644 --- a/service/src/main/inse/auth/service.py +++ b/service/src/main/inse/auth/service.py @@ -203,11 +203,21 @@ def request_otk(session: Session, email: str, password: str): session.commit() - logger.info( - "Saved OTK for account %s with expiration at %s", account.id, expires_at - ) + if settings.environment == "prod": + logger.info( + "Saved OTK for account %s with expiration at %s", + account.id, + expires_at, + ) + else: + logger.info( + "OTK code for account %s: %s, expires at %s", + account.id, + otk_code, + expires_at, + ) - return {"status": "ok"} + return {"status": "ok", "account_id": str(account.id)} def login(session: Session, response: Response, account_id: uuid.UUID, email_code: str):