Scopes and Claims
Here you can see all the scopes and claims we support.
Scopes are permissions that give access to certain claims or APIs, the user can give access to other applications using those scopes. They can be configured using the Vulos Identity dashboard.
Claims can be accessed using the OpenID Connect
userinfo
endpoint or by using User.info()
in the JavaScript SDK.get
https://identity.vulos.io/connect
/userinfo
User Info
This scope can be used to identify the user using the
sub
claim, which is a per-user unique identifier.This is a required scope, meaning that if the user decides do use an app, they cannot restrict access to this scope if the app requires it.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
const userId = userInfo.sub() // there is an alias called id() as well
{
"sub": "<guid>"
}
This scope can be used to get the user's email and their email confirmation status.
This is a required scope, meaning that if the user decides do use an app, they cannot restrict access to this scope if the app requires it.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
if (userInfo.isEmailVerified()) {
const email = userInfo.email()
// do something with the email
}
This scope can be used to get some personal information about the user.
This is a required scope, meaning that if the user decides do use an app, they cannot restrict access to this scope if the app requires it.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
const profilePicture = userInfo.picture()
const firstName = userInfo.firstName()
const lastName = userInfo.lastName()
const birthDate = userInfo.birthDate()
{
"picture": "<link to profile picture>",
"given_name": "John",
"family_name": "Doe",
"birthdate": "YYYY-MM-DD"
}
This scope can be used to get the user's address.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
const address = userInfo.address()
{
"address": "{ ... }"
}
This scope can be used to get the user's trust level and KYC verification status.
This is a required scope, meaning that if the user decides do use an app, they cannot restrict access to this scope if the app requires it.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
if (userInfo.isKycVerified()) {
// the user has done a successful KYC verification
}
if (userInfo.trustLevel() >= 2) {
// the user has a high trust level
}
{
"trust_level": 1,
"kyc_verified": false
}
This scope can be used to get the user's digital ID and national ID.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
const nationalId = userInfo.nationalId()
{
"national_id": "<national id>",
"digital_id": "<digital id>"
}
This scope can be used to get the user's Ethereum and Velas wallet addresses.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
const wallets = userInfo.wallets()
for (const walletAddress of wallets) {
// do something with the user's wallet address
}
{
"wallet_address": [
"<ethereum wallet address>",
"<ethereum wallet address 2>"
]
}
// ... or
{
"wallet_address": "<ethereum wallet address>"
}
The organization scope group is divided in 3 scopes:
organization:read
which provides the claimsorganization:name
andorganization:id
for all the organizations that the user has a membership for;organization:roles
which provides theorganization:role
claim for the roles that the user has in the application's associated organization;
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
if (userInfo.isInOrganizationWithName("Example Organization")) {
// the user is in the organization "Example Organization"
}
if (userInfo.isInOrganizationWithId(5)) {
// the user is in the organization that has the id 5
}
{
"organization:id": [2, 5]
"organization:name": ["Test Organization", "Example Organization"]
}
// ... or
{
"organization:id": 5
"organization:name": "Example Organization"
}
This is a required scope, meaning that if the user decides do use an app, they cannot restrict access to this scope if the app requires it.
JavaScript
JSON
// assuming you have done the correct setup and have an UserInfo instance
if (userInfo.hasRole("SuperAdmin")) {
// the user has the SuperAdmin role in the app's associated organization
}
{
"organization:role": ["SuperAdmin", "Example"]
}
// .. or
{
"organization:role": "SuperAdmin"
}
This scope doesn't provide any claims, it just provides access to the following API:
The
kyc
scope group is divided in 2 scopes:kyc:read
which gives access to the KYC status and list APIs;kyc:write
which gives access to the KYC create and upload APIs;
The event scope group is divided in 3 scopes:
event:create
which lets the application create event sessions;event:read
which lets the application read/subscribe to event sessions;event:write
which lets the application push events to a session;
Last modified 1yr ago