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:
- Flui creates a client for it on the identity server, with the return addresses you give.
- The application receives three variables: the issuer, the client id and the client secret. The secret is stored as a secret.
- 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.
List the identity installs you can use:
flui identity installsConnect the application:
flui app identity connect my-shop --install <install-id> --redirect /auth/callbackUse --issuer-var, --client-id-var and --client-secret-var to
change the variable names. flui app identity my-shop shows the
connection.
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:
flui identity users <install-id>flui identity users invite <install-id> --email alice@example.com --given-name Alice --family-name Doeflui 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:
flui identity export <install-id> --out users.jsonThe 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.