Hi @viomr,
Welcome to the Auth0 Community!
Yes, this is possible with using a post-login action script to append custom claims to tokens. If you need a reference on how to do this, please check out our Adding custom claims to tokens knowledge article.
If you prefer not to expose your local machine to the internet, then you could consider appending the user_id that you generated from your own database to the user_metadata.
Then with a post-login action script, you could append the event.user.user_metadata.custom_user_id
as a custom claim.
This way, you can still get this information added to the token without exposing your local machine to the internet.
Let me know if you have any questions about this.
Thanks,
Rueben