add mobile & national code to jwt access

This commit is contained in:
2025-05-05 08:55:55 +03:30
parent 9d63a7d531
commit 7e301c14b7
2 changed files with 11 additions and 5 deletions

View File

@@ -53,5 +53,7 @@ class CustomizedTokenObtainPairSerializer(TokenObtainPairSerializer): # noqa
# Add custom claims
token['name'] = user.username
token['mobile'] = user.mobile
token['national_code'] = user.national_code
return token