Hello. I have three different custom user roles in Settings → Users & Permissions Plugin → Roles, and those are: Company Admin, Company User and Guest User. When I log in as Company Admin or Company User, I need an information about the role, so as to show the user the correct content. The response from the /api/auth/local endpoint is looking like this:
{
"jwt": "...",
"user": {
"id": 5,
"username": "Lorem ipsum",
"email": "mail@email.com",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2021-12-20T11:44:45.928Z",
"updatedAt": "2021-12-20T11:44:45.928Z"
}
}
Neither on this nor on the /users endpoint do I have the information about the user’s role. How can I retrieve it? Thanks in advance