Most useful apps are not one-size-fits-all. A booking system needs to distinguish customers from staff. A community platform needs members who can post and moderators who can manage content. A business tool needs employees who can view data and admins who can change it. The moment your app has more than one kind of person using it, you need a way to tell them apart and control what each one can do.
When you ask Caffeine to build an app that has user accounts, restricted features, or an admin panel, the AI generates a complete user access system — login, role assignment, and access control — all without you having to configure anything manually.
Login: Internet Identity
Caffeine apps use Internet Identity for authentication — a decentralized login system built into the Internet Computer. Users log in using a passkey, Face ID, Touch ID, or another device authenticator. There are no passwords and no email/password accounts to manage.
From your app users' perspective, login is a button that opens Internet Identity in a popup. After authenticating, the popup closes and they are logged in. Logging out clears their session.
You do not need to set up or integrate Internet Identity — the AI handles it as part of generating the app.
The three roles
Every Caffeine app with user accounts has three built-in roles:
Admin — full access. Admins can do everything users can, plus any admin-only features your app defines: managing content, viewing all data, configuring settings, assigning roles to other users.
User — a logged-in, registered member of your app. Users can access features that require login but are not restricted to admins.
Guest — anyone who is not logged in. Guests can access only the public parts of your app.
The AI uses these three roles to generate appropriate access controls throughout your app. Admin-only features are guarded so that non-admins who try to access them are turned away. Features requiring login are hidden or disabled for guests.
How users get their role
When someone logs in to your app for the first time, they are automatically registered and assigned the User role. This happens silently — no approval step, no manual registration. From their perspective, they just logged in.
The exception is the app creator claiming admin. When Caffeine deploys your app, it embeds a secret admin token in the canister and includes it in the deployment link it shows you. The first person to open that link and log in is recognized as the creator and assigned the Admin role. Anyone who logs in without the token becomes a User. See the article on becoming admin for the full details.
Any admin can later promote a user to admin or demote an admin to user — your app's admin panel will include a user management interface for this.
What the AI generates
When your app needs user accounts, the AI builds the full system:
- A login button that opens Internet Identity
- Automatic role assignment on first login
- A user profile system — because Internet Identity principals are not human-readable, the app asks each new user for their name the first time they log in
- Access-controlled backend functions (admin-only, user-only, or public)
- An admin panel with a user list and role management
The exact shape of these depends on what you asked for. A simple app with a login requirement gets a minimal version; an app with a complex admin dashboard gets a more complete one.
Customizing beyond the three roles
The built-in system has three roles: admin, user, and guest. For most apps this is sufficient. If your app needs more nuance — for example, separate "editor" and "viewer" roles — describe it in the chat and the AI will build a custom role system on top of the standard one. The blog that powers Caffeine's own website, for example, has admin, editor, and pending roles that control who can publish content.
No plan required
User accounts and access control are available on all Caffeine plans with no feature flags or configuration.
Frequently asked questions
Do my app's users need a Caffeine account to log in?
No. Internet Identity is separate from Caffeine. Your app's users log in with their own Internet Identity — a free, decentralized identity that anyone can create. They do not need a Caffeine account.
Can my app have multiple admins?
Yes. Once you are admin, you can promote any other user to admin from your app's user management panel. There is no limit on the number of admins.
What if nobody has logged in yet — is there still an admin?
No. The admin role is assigned when the creator opens the deployment link and logs in. Until that happens, there is no admin. This is why it's important to open your deployment link and log in yourself immediately after Caffeine finishes deploying.
Can users log in with Google, email, or a password?
No. Internet Identity is the only supported authentication method for Caffeine apps. It uses passkeys, Face ID, Touch ID, or hardware security keys — no passwords or email addresses.
Can I restrict my app so only invited people can access it?
Yes. You can ask the AI to build an access-controlled app: "Only approved users should be able to see the app content" or "Add a waitlist — users sign up and I approve them manually." The AI will generate the appropriate access control logic.
What happens to user accounts if I redeploy my app?
User accounts and roles are stored in your app's canister on the Internet Computer. They persist across redeployments — your users stay logged in and their roles are unchanged after an update.