From de50aeb4fefe726e494a3dec0490aa330ba64a0d Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Sun, 17 May 2026 23:44:49 +0200 Subject: [PATCH] wip hint if the user is authenticated or not in attributes --- src/backend/core/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/core/utils.py b/src/backend/core/utils.py index cbacbe1e..cbb0ab2e 100644 --- a/src/backend/core/utils.py +++ b/src/backend/core/utils.py @@ -121,7 +121,11 @@ def generate_token( .with_identity(identity) .with_name(username or default_username) .with_attributes( - {"color": color, "room_admin": "true" if is_admin_or_owner else "false"} + { + "color": color, + "room_admin": "true" if is_admin_or_owner else "false", + "is_authenticated": not user.is_anonymous, + } ) )