I think there are a couple possibilities for you:
- you app takes the
user_id
from thesub
field and queries your DB itself, or - you add additional claims to your token using a rule that queries your DB.
If you are already following the second option (sounds like maybe you are) you will want to take any attributes retrieved from the DB and added them as custom claims. This will make the attributes available in the token.