diff --git a/backend/src/main/java/com/alttd/altitudeweb/controllers/login/LoginController.java b/backend/src/main/java/com/alttd/altitudeweb/controllers/login/LoginController.java index 91c53f5..ecbf207 100644 --- a/backend/src/main/java/com/alttd/altitudeweb/controllers/login/LoginController.java +++ b/backend/src/main/java/com/alttd/altitudeweb/controllers/login/LoginController.java @@ -84,11 +84,13 @@ public class LoginController implements LoginApi { @Override public ResponseEntity login(String code) { if (code == null) { + log.warn("Received null login code"); return ResponseEntity.badRequest().build(); } CacheEntry cacheEntry = cache.get(code); if (cacheEntry == null || cacheEntry.expiry().isBefore(Instant.now())) { + log.warn("Received invalid login code {}", code); return ResponseEntity.status(HttpStatus.FORBIDDEN).build(); } @@ -96,6 +98,7 @@ public class LoginController implements LoginApi { cache.remove(code); + log.debug("Generated token for user {}", cacheEntry.uuid); return ResponseEntity.ok(token); } diff --git a/backend/src/main/resources/application-beta.properties b/backend/src/main/resources/application-beta.properties index a77afdd..f73facb 100644 --- a/backend/src/main/resources/application-beta.properties +++ b/backend/src/main/resources/application-beta.properties @@ -5,4 +5,4 @@ database.host=${DB_HOST:localhost} database.user=${DB_USER:root} database.password=${DB_PASSWORD:root} cors.allowed-origins=${CORS:https://beta.alttd.com} -logging.level.com.alttd.altitudeweb=INFO +logging.level.com.alttd.altitudeweb=DEBUG