Using 'sub' as user id

Hello,
I am new to Auth0, I have an app that requires a unique user Id for a user to carry out certain tasks.
I understand that I can create custom claims for the user id. My question is, can I use the ‘sub’ claim as an ID for the user? Is it a bad idea to use the sub claim within the app, store it in the database and use it for that purpose?

1 Like

Hi @ama,

Welcome to the Community!

You can definitely use sub as your user id.

Hope this helps!

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.