Auth0|{user_id } length

I use Auth0 without social identity connection meaning all of my user_id fields in the id token have a auth0|{user_id } pattern. I noticed the user_id part is always a hex number so I want to strip the auth0| part and use the hex as a user ID in my application (obviously this has better performance vs string). Problem is this doesn’t fit in a “long” type (in Java nor database). Is there anyway I can modify the configs to make this number smaller so it would fit in a long?

Hi @diego.alejandro.gome

I don’t think you can do that.

Instead, if you can generate a unique ID for each user, you can store that in the app_metadata and return it in the token, then use that to key into your DB.

John

I figured it out, I pad the hex number and use it as uuid.