Skip to content
Skip to content
PGB Learn

Ask for more at sign-up with profile fields

Collect a username, name, user type or custom details at sign-up, checked on the server and saved with the user's profile.

Updated Nov 12, 2026

By default, sign-up asks for an email and, if you use passwords, a password. Sign-up fields let you ask for more, such as a username, a name, a user type or an organization. Each value is checked on the server, so your own form cannot skip the rules, and it is saved with the user's profile under the field's key.

Add fields

  1. Open Authentication > Settings > Sign-up fields.
  2. Under Add:, choose a ready-made field: Username, First name, Last name, User type or Organization. Or choose Custom field.
  3. Adjust the field (see below).
  4. Choose Save changes.

Existing users are not changed by new fields.

What you can set on a field

  • Label: what the user sees, for example "Username".
  • Key (saved as): the name the value is stored under in the profile, for example username.
  • Type: Short text, Long text, Number, Yes / no or Choice.
  • Limits depending on the type: Shortest and Longest for text, Lowest and Highest for numbers, and Choices (one per line) for a choice.
  • Hint (optional): shown under the field.
  • Flags such as required, unique and whether the user can edit the value later. The ready-made Username field is required, unique, and 3 to 30 characters. User type is a required choice (customer or admin) that cannot be edited afterwards.

Note: A "user type" field that offers admin is only a label stored on the profile. Never use a value a user typed at sign-up to decide who gets special rights. Grant powers on your server, or with a field the user cannot edit.

Use it in your app

Your app sends the values as metadata when it signs a user up:

await pgb.auth.signUp({
  email, password,
  metadata: { username: "alex", user_type: "customer" },
});

Your sign-up form can read the list of fields from the project's settings (getSettings()) and draw itself from it. Later, updateUser({ metadata: { name: "Alex" } }) changes values the user is allowed to edit, and a null removes a key.

Test it

In Auth Playground use Sign up, then open the user in Authentication > Manage to see the saved profile.

Good to know

  • Values that fail a rule are refused with a message that names the field.
  • Profile values are stored with the user and returned by the user calls. Do not store secrets in them.

More guides in Console: authentication