Auth0 Home Blog Docs

GUID for user logged in



I need GUID after passing through this steps in windows forms application

 private void DisplayResult(LoginResult logingResultTest2)

i do not know how to get GUID for logged in user
for example i know to get identity token, access token

    sb.AppendLine($"id_token: {logingResultTest2.IdentityToken}");
    sb.AppendLine($"access_token: {logingResultTest2.AccessToken}");

what is the way to get 32 digit GUID


The ID token, which is always guaranteed to be in the JWT format, will contain a sub claim that represents the user identifier in a unique way (within the realm of the authentication service associated with the token).

This means that after validation of the ID token you can extract a unique user identifier from within it; this identifier may not be a 32 digit GUID, but it will be unique so if you really need a GUID you can just generate a new one and associated it with the identifier contained in the sub claim in your own database.