diff --git a/aleksis/core/apps.py b/aleksis/core/apps.py index 096d7effb318402480dcb35bb244a96d59b0d156..97f36261616c814b26b70f412b9827c6a3a8c174 100644 --- a/aleksis/core/apps.py +++ b/aleksis/core/apps.py @@ -212,6 +212,10 @@ class CoreConfig(AppConfig): "postal_code": request.user.person.postal_code, } + if "phone" in scopes and has_person(request.user): + claims["mobile_number"] = request.user.person.mobile_number + claims["phone_number"] = request.user.person.phone_number + if "groups" in scopes and has_person(request.user): claims["groups"] = list( request.user.person.member_of.values_list("name", flat=True).all()