Is it a bad practice to store my user’s ObjectId in a JWT in the sub claim?


Is it a bad practice to store my user’s ObjectId in a JWT in the sub claim? I could create an alternate UUID field in the user database and use this instead, but I wondered if I should?

I use this sub claim in both the refreshToken and accessToken.