Users

The users are the main entities of the identity service. We will describe the user-related concepts and details in the following.

Profile

Each user has a profile containing all user information.

It consists of the following types of data:

  • Social identities: stores the user info retrieved from social sign-in (i.e., sign-in with a social connector), such as Facebook, GitHub, and WeChat.

  • Custom data: stores additional user info not listed in the pre-defined user properties, such as user-preferred color and language.

  • Basic data: is the basic info from the user profile. It stores all other user's properties except for identities and custom_data, such as user id, username, email, phone number, and when the user last signed in.

Here is a sample of a user's data which is retrieved from a sign-in to Facebook:

{
  "userDetail": {
    "family_name": "User",
    "email": "vimalprakashts@gmail.com",
    "given_name": "System",
    "sub": "b1c9676a-d9f5-4cf0-a3fc-c2d49bde06ae",
    "isub": "03ca3d79-b0b6-4dd9-b527-3bbfb491a0d8",
    "name": "System User",
    "email_verified": true,
    "phone_number_verified": false,
    "updated_at": 1663438130,
    "created_at": 1647170635,
    "last_logged_in_time": 1663438130,
    "providers": [
      {
        "provider_type": "CLASSICAL",
        "provider_name": "self",
        "social_identity_ref": "",
        "username": ""
      },
{
        "provider_type": "social",
        "provider_name": "FACEBOOK",
        "social_identity_ref": "safaseervasdfad",
        "username": "vimalprakashts@gmail.com"
      }

    ],
    "groups": [
      {
        "roles": [
          "auth_admin"
        ],
        "group_id": "auth_admins",
        "group_name": "ADMIN",
        "roles_obj": [
          {
            "permissions": [],
            "role_key": "auth_admin"
          }
        ]
      }
    ]
  }
}

You can query the user profile using Admin Console or Management API, such as GET /users-srv/users/byadmin/:sub.

Basic data

Let's walk through all properties of the user's basic data.

sub

sub is a unique auto-generated key to identify the user in Auth.

given_name, family_name, middle_name , name

Users name information

email

email is the user's email address, used for sign-in with the email and passcode.

Its value is usually from the email address that the user first registered with. It may be null. Its max length is 128.

Email_verified

Given email is verified or not. For classical register by default email is unverified, for social it is verified.

phone_number

phone_number is the user's phone number, used for sign-in with the phone number and passcode from SMS.

Its value is usually from the phone number that the user first registered with. It may be null. Its non-null value should contain numbers prefixed with the country calling code (including the plus sign +).

Phone_number_verified

Given phone is verified or not.

Updated_at

Last update on the user entity

Created_at

Created date and time

Last_logged_in_time

Time the user logged in last.

Providers

List of opt-in providers for the user. SELF (Classical), FACEBOOK, GOOGLE, etc.

Groups

What are the groups and roles the user is part of.

Last updated