Skip to content

Sign in the users of your applications

Your applications often need their own users: customers, members, staff. Flui gives you an identity server for them. It is separate from the sign-in you use to operate Flui, so a person who signs in to your application never gets access to Flui itself.

The identity server is Zitadel, installed from the catalog. It handles sign-up, sign-in, multi-factor authentication and passkeys, and speaks OpenID Connect. Your application talks to it like it would talk to any OpenID Connect provider.

Install the identity server

Install Zitadel from the catalog like any other application. Choose its address carefully: it becomes the issuer that every connected application trusts, and changing it later means reconnecting them all.

At install you also choose the name of the first organization and the email and password of its administrator.

Connect an application

Connecting an application does three things:

  1. Flui creates a client for it on the identity server, with the return addresses you give.
  2. The application receives three variables: the issuer, the client id and the client secret. The secret is stored as a secret.
  3. The application is redeployed so it reads them.

The default variable names are OIDC_ISSUER, OIDC_CLIENT_ID and OIDC_CLIENT_SECRET. You can choose other names if your application expects them.

Open the application, then the Sign-in tab. Pick the identity install, enter the path the identity server sends people back to (for example /auth/callback), and select Connect.

To stop, use Disconnect on the same tab or flui app identity disconnect my-shop. Flui deletes the client on the identity server and removes the three variables.

Manage the people who sign in

Open the Zitadel application in the dashboard and its Sign-in tab. You see everyone who can sign in to the connected applications. From there you can invite a person by email and block or unblock them.

The same from the CLI:

Terminal window
flui identity users <install-id>
flui identity users invite <install-id> --email alice@example.com --given-name Alice --family-name Doe
flui identity users block <install-id> <user-id>
flui identity users unblock <install-id> <user-id>

Export the users

You can take your users with you:

Terminal window
flui identity export <install-id> --out users.json

The file holds password hashes and one-time-password secrets, so treat it like a backup of the identity server itself. Flui creates it readable by you only. Exporting needs write access to the identity install.

Installs made before this feature

An identity install created before Flui could manage it is listed with a note: it can still sign people in, but Flui cannot create clients on it. Reinstall it to manage it from Flui.