Skip to main content
By the end of this guide you will have invited a person to your hosted app, given them roles, locked and unlocked their account, ended their sessions and removed them, all from the terminal. These are the users who sign in to the app you deployed, not the members of your Reliant organization. A hosted environment that declares forge.ManagedIdentity gets its own identity instance, and reliant forge cloud identity administers it through the control plane. You never handle the identity provider’s console or an admin password.

Before you begin

  • A Forge app with sign-in deployed to a hosted environment. Add sign-in methods declares the identity, and Deploy a Go API with managed Postgres ships it.
  • Forge v1.6 or later, run as reliant forge inside the project.
  • To read users, the identity:read grant. To change them, you must be an organization admin with identity:manage. Under Reliant, forge exchanges your sign-in for that scope per command; there is no separate login.
1

Check the identity

terminal
Mail: decides how invitations travel. With smtp declared in forge.ManagedIdentity, the code is emailed. With none, you pass --return-code and deliver it yourself.
2

Invite a user

terminal
The link opens your app’s own password page. It works once and expires in about an hour; reset issues a new one. Inviting an existing account grants it the roles instead. --role takes the role keys identity.k declares, and is repeatable.
3

List users

terminal
--query filters by an email substring, and --page-size with --page-token pages through large lists. --json prints the same as a document, never with credentials.
4

Change roles

set-roles replaces the user’s roles with exactly the ones you name:
terminal
--none removes every role. A role whose members identity.k declares (members_from = "declared") is read-only here: change its members list and deploy instead.
5

Lock an account and end its sessions

terminal
users now shows IDENTITY_USER_STATE_LOCKED. Locking stops new sign-ins; revoke-sessions ends the ones in progress, though an access token already issued stays valid until it expires. unlock lets the user back in.
6

Reset a password or remove a user

reset --user <email> --return-code issues a new password-set code; the current password keeps working until the code is used. To remove the account for good:
terminal
Without --yes it asks on the terminal, and refuses when there is no terminal to ask. A user who holds a declared role is refused, since the next deploy would recreate them.

What this does not do

  • It doesn’t send mail unless the environment can. With Mail: none, invitations and resets need --return-code, and the code is a credential you deliver.
  • It doesn’t set passwords. There is no password option and no seed account: each person sets their own through the link.
  • Exporting users isn’t available on Reliant hosting yet. reliant forge cloud identity export is refused with “export is not enabled for this deployment”.
  • Roles are not permissions. What a role may do is your handler code (Scope rows to their owner).

Troubleshooting

The invite or reset was refused because the environment declares no smtp. Add --return-code, or declare smtp in forge.ManagedIdentity and deploy.

Next steps

Add sign-in methods

Passwords, passkeys and the roles your app declares.

Scope rows to their owner

Use the signed-in user in every query.

Manage production secrets

Keep credentials out of git, per environment.

CLI reference

Every cloud identity verb and flag.