UserInfo

Members

response : any

The OpenID userinfo endpoint response that this object was created with.

Methods

constructor(response)

Create an object that contains user information

const response = await fetch(/* arguments to fetch the OpenID userinfo endpoint */)
        .then(data => data.json())
const userInfo = new UserInfo(response)

// ... or

const userInfo = user.info()
circle-exclamation
circle-info

See User for more information.

circle-info

See BaseAuth for more information.

id()

Get an unique identifier about the user.

circle-info

This is the same as sub(), it exists for readability.

circle-exclamation

sub()

Get an unique identifier about the user.

circle-info

This is the same as id(), it exists for readability.

circle-exclamation

firstName()

Get the user's first name.

circle-exclamation

lastName()

Get the user's last name.

circle-exclamation

birthDate()

Get the user's birth date.

circle-exclamation

nationalId()

Get the user's unique national identifier (for example their SSN in the US).

circle-exclamation

trustLevel()

Get the user's Vulos Identity trust level.

  • 1 indicates that the user has done no KYC verification but has provided basic details.

  • 2 indicates that the user has successfully KYC verification.

  • Anything other than that indicates that the user has done some action to reduce or increase their trust level that hasn't been specified in this document.

circle-exclamation

isEmailVerified()

Get the user's email verification status.

circle-exclamation

isKycVerified()

Get the user's KYC verification status.

circle-exclamation

address()

Get the user's address.

circle-exclamation

email()

Get the user's email address.

circle-exclamation

hasRole(role)

Check if the user has a specific role in the associated organization to the application.

circle-exclamation

isInOrganizationWithName(name)

Check if the user is in a specific organization by name.

circle-exclamation
circle-exclamation

isInOrganizationWithId(id)

Check if the user is in a specific organization by id.

circle-info

You can obtain the organization ID using the Organization API or by checking the URL of the organization's page on the Vulos Identity dashboard.

circle-exclamation

wallets()

Get the user's Ethereum wallet addresses.

circle-exclamation

picture()

Get the user's profile picture.

circle-exclamation

Last updated