Yes, most definitely. In this scenario, I recommend appending the username as a custom claim to the ID token and calling the getIdTokenClaims property to read these claims on your app.
Please see our this FAQ for more instructions on adding custom claims to tokens.