2 minute read
Learn how user info is used to store data about a user
User info is a blob of data that is made available to service providers. This blob can be changed via the dashboard, or via our API. Simply POST to us new JSON data to store, and we’ll update it in our systems.
Once a service provider has an access token, they can query an endpoint to get the user info of a given user.
$ curl https://auth.authproject-demo.com/oauth2/userinfo
{
"fname": "Alan",
"lname": "Turing",
"sub": "user-75f3ef985d544ed0a6995523cf21660d"
}
Authorization
header for this endpoint to work. See your OAuth client library for how to query the userinfo endpoint.To update the stored user info, you can send a POST request to the same endpoint, with the entire blob you wish to store. We do not currently support inserts to existing user info, we only support replacement of what is there.
$ curl -X POST https://auth.authproject-demo.com/oauth2/userinfo
{
"fname": "Alan",
"lname": "Turing",
"age": 41
}
sub
value. This is a value populated by our systems, and cannot be changed.A subsequent GET to the endpoint will return the updated values.
$ curl https://auth.authproject-demo.com/oauth2/userinfo
{
"fname": "Alan",
"lname": "Turing",
"age": 41,
"sub": "user-75f3ef985d544ed0a6995523cf21660d"
}