Custom fields, the token template and the sign-in check are available on the Pro plan and above.
Three kinds of field
Organizations have public and private fields. People have all three kinds.
Limits
- Each kind is a JSON object, like
{"plan": "gold"}. - Each kind holds at most 8 KB.
- A top-level name starts with a letter and has only letters, digits and
_, up to 64 characters. - Values nest at most 5 levels deep.
- A write replaces each kind it names. Send an empty object to clear one. Kinds you leave out stay as they are.
In the console
- A person’s fields: go to People, open the person, and find Custom fields. This needs Manage people, and you only see people whose role is within your own access. Changing public fields also needs Manage sign-in security, because they can reach tokens.
- Your organization’s fields: go to Developers and find Organization’s custom fields. This needs Manage sign-in security.
Through the admin API
Your server reads and writes fields with an API key.Put fields in sign-in tokens
Under Developers → What sign-in tokens include, you can write one JSON template for your organization. It adds claims to the ID token and to/oauth/userinfo for every app, whatever scope the app asked for.
user.id,user.email,user.first_name,user.last_name,user.public.*org.id,org.slug,org.name,org.public.*
- A value that is a single placeholder keeps its type. A number stays a number.
- A placeholder inside other text becomes text.
- A placeholder that finds nothing drops its key.
- Private fields and person fields can never be used.
- Claims Aiveth sets itself, such as
sub,iss,aud,expand the role claims, can’t be changed. - The template, and what it renders to, is at most 3 KB. A result over that adds nothing.