Access User Profiles
Learn how to access User Profiles
Last updated
Was this helpful?
Learn how to access User Profiles
Last updated
Was this helpful?
To access any of the applications in your Authgear account, each user must have a profile in the account. contain information about your users such as name, contact information, and and you define. You can retrieve and manage user profiles in the following ways:
.
.
.
.
Access Right defines what information can be viewed or modified when a user's profile is accessed via the Authgear Portal, User Info endpoint, or User Settings page.
An Access Right can be set for each profile attribute under a specific medium of accessing user profiles. For example, in the following screenshot, the Primary Email attribute has the Editable Access Right for Portal, Read-only
for User Info endpoint (also known as access Token Bearer), and Editable
for User Settings page. In simpler terms, the example means an admin can modify Primary Email in Authgear Portal, while a client application can use a user's access token to view their Primary Email. Finally, users can edit their own Primary Email from the User Settings page.
The following are the available Access Right options that can be applied to each attribute for a specific medium.
Editable: Grants a medium access to view and modify the value of an attribute.
Read-only: A medium with this access for an attribute can only view the value of the attribute.
Hidden: If the access for an attribute is set to Hidden
for a medium, that medium can not view or modify the attribute.
By default, Authgear sets different access rights for the standard attributes on each way of accessing user profiles. You can view and configure this default access right from User Profile > Standard Attributes in the Authgear Portal.
For Custom Attributes, you can define the access right for each way of accessing a user profile from User Profile > Custom Attributes in the portal.
Each way of accessing user profiles belongs to one of the following Access Right Categories:
Portal Admin Access Right: Use this category to set the access right of an attribute in the Authgear Portal for an admin user.
Token Bearer Access Right: This sets the access right of an attribute for the User Info endpoint when a token bearer accesses it. It can be "Hidden" or "Read-Only".
End-user Access Right: Use this to set the access right of the attribute for the default User Settings UI when accessed by an end-user.
It is the fastest and easiest way to view user profiles and manage them.
The UserInfo endpoint returns the Claims about the authenticated end-user, including the standard profile and custom attributes.
The userInfo
object is returned from calling fetch user info function which contains a unique identifier of the user.
The following are some attributes that are usually in the userInfo object. Other attributes like email, phoneNumber and custom attributes will be in the userInfo object if those attributes were set for the current user.
isAnonymous
boolean
isVerified
boolean
Indicate if the user completed the verification requirement
sub
string
Unique identifier of the user in your Authgear project
To access a user's profile using the UserInfo endpoint of OpenID Connect, you need to follow these steps:
Authgear WebHooks makes it possible to embed the standard attributes and custom attributes for a user's profile into the OIDC JSON Web Token (JWT). Hence, you access both profile attributes in the JWT returned to your OIDC client without making another call to the UserInfo endpoint.
An Authgear account: You need an Authgear account to follow this guide. If you don't have one, you can on the Authgear website.
A Registered App: You need a (client) in Authgear.
Go to the .
Once Authgear completes authentication and returns control to your application, it provides the user profile to the application. Most developers prefer to use the Authgear SDKs to get the UserInfo object using the fetch user info function. To start using this function read relevant to the SDK of your choice. Here are some code snippets that call the fetch user info function for different Authgear SDKs:
See the for more details about the shape of user info and the available user profile attributes.
Authgear provides an GraphQL endpoint that allows applications and services to access and manipulate the User Profile object. The lets users interactively explore the Admin API. With the API Explorer, you can search for users' profiles or update their standard or custom attributes. See the example steps of how to achieve this below:
The OpenID Connect (OIDC) endpoint is a protected resource that provides information about a user when a service provider presents an access token that has been issued by your Authgear Token endpoint. The scopes in the access token specify the user attributes that are returned in the response of the user info endpoint. It is important to note that the openid
scope must be one of the access token claims.
Indicate if the user is anonymous, i.e. no or is provided
We are going to use cURL commands in our API calls or you can also use or similar tools.
You have successfully configured your application to use Authgear as an OIDC provider. See your for detailed steps.
See a detailed explanation of the structure and fields included in the response of the UserInfo endpoint .
See our post about how to to learn more.