From 92bb1cc648aad0b4d4ee8d9e1b945edf94c7fd99 Mon Sep 17 00:00:00 2001 From: Brian Wiborg Date: Sat, 27 Sep 2025 16:15:50 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Return=20entire=20user=20o?= =?UTF-8?q?bject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Model.Schema already prevents password_hash from leaking --- src/ohmyapi/builtin/auth/routes.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ohmyapi/builtin/auth/routes.py b/src/ohmyapi/builtin/auth/routes.py index b944e05..3a9ea39 100644 --- a/src/ohmyapi/builtin/auth/routes.py +++ b/src/ohmyapi/builtin/auth/routes.py @@ -160,11 +160,5 @@ async def introspect(token: Dict = Depends(get_token)): @router.get("/me") async def me(user: User = Depends(get_current_user)): """Return the currently authenticated user.""" - return { - "email": user.email, - "username": user.username, - "is_admin": user.is_admin, - "is_staff": user.is_staff, - } - + return user