When a custom Zitadel login UI is worth building
When hosted branding no longer covers the login journey you need, a custom login UI built on the Zitadel session API is the route, and it means your team owns an application. Branding changes colors, logos and text on the standard hosted pages. A custom UI changes the screens themselves: the order of steps, which factors are offered when, what a returning user sees, and how errors and recovery are presented. The Zitadel Login UI is an MIT-licensed Next.js application in the Zitadel monorepo, and it is the reference implementation you would fork or replace. Once you take that path, the login screens become code you build, secure, deploy and patch alongside the rest of your stack.
Before committing, separate three kinds of need. Branding is enough when the flow is standard and only the look must change. Actions are the right tool when you need to run logic during login, such as checking a domain or enriching a token, without changing the screens. A custom UI is justified when the sequence or content of the screens itself is part of the product: for example, a B2B sign-in that asks for an organization identifier first, routes to a partner identity provider, then presents a step-up choice that your own policy defines. Write the required screens and their branches down as a flow diagram, then test each step against branding and Actions first. Only what those cannot express should move to your code.
Confirm three things with your Zitadel team before you start. First, which Login UI release you will base your fork on, since the Login UI is distributed in the monorepo and the fork should start from a release tag, as the Zitadel custom Login UI guide recommends. Second, who on your side will own the application after launch, including dependency updates, security fixes and the Next.js runtime. Third, which session API capabilities your flow needs for passwords, passkeys, MFA and external identity providers, and whether your version exposes them. A custom UI is a commitment to maintenance for as long as the flow exists, so the decision should rest on a flow that cannot be met any other way.
Choosing between branding, forking the Login UI and building from scratch
Hosted login keeps the Zitadel-provided login pages and adds your brand on top. The team owns the branding settings, the policy configuration and the decisions about which login methods each organization can use. Zitadel delivers and updates the login application as part of the platform, so there is no login code for your team to build, secure or patch. The limit is that page structure, flow order and custom screens are set by the product, not by your team.
- What you own: logos, colors, text and the login policies configured per organization.
- What you can change: visual identity and the methods offered, within what the hosted pages support.
- Where maintenance sits: with the Zitadel upgrade cycle on your self-hosted deployment, which your platform team still plans and runs.
- What you cannot change: screen layout, step order and custom interaction logic beyond the hosted options.
- Good fit: teams whose login needs are standard and whose main requirement is brand consistency.
Before committing, list every login screen your product needs and check each one against the hosted options with the current Zitadel documentation for your version.
Forking takes the MIT-licensed Next.js Login UI from the Zitadel monorepo and changes it to match your product. Zitadel advises forking the whole repository from a release tag rather than cherry-picking files, so the fork starts from a known, versioned state. Your team then owns the application itself: it must be built, secured, deployed and updated as a separate service that calls the same session API the hosted pages use.
- What you own: the forked repository, its build pipeline, its hosting and its security posture.
- What you can change: page layout, components, flow order and copy, because the source is yours to modify.
- Where maintenance sits: with your team, which must merge each new upstream release tag into the fork and retest your changes.
- Licensing: the Login UI is MIT-licensed, so modifications can be kept private, but the license terms should be confirmed by your legal team.
- Good fit: teams that need custom screens or flows and can staff ongoing upgrades.
Before forking, estimate the upgrade effort for each Zitadel release you plan to follow and assign a named owner for it.
A front end built from scratch uses the Zitadel session API directly, so your application controls every screen and the stack it runs on. The team owns all of the login UI code, the session handling, the error states and the accessibility work. Zitadel still owns the authentication decisions behind the API, including password checks, passkey verification, MFA enforcement and external identity provider handoffs, which keeps security logic out of your code only where the API performs it.
- What you own: the entire login front end, its framework choice, its tests and its release process.
- What you can change: everything in the user experience, provided the session API supports the flow you design.
- Where maintenance sits: with your team for the front end, and with the API version your deployment runs.
- Security work: your team must handle session state, input handling, rate-limit responses and error messages correctly.
- Good fit: teams with a mature front-end practice and flows that the hosted pages and a fork cannot express.
Before starting, confirm with Zitadel's API documentation which session API operations your target version exposes and how each login method is covered.
Configuration options and when each one fits
This table compares three ways to control the Zitadel login experience: hosted branding, a forked Login UI that you deploy, and a custom front end built on the session API. Read each row against your own requirements for login methods, who owns the code and how often you must upgrade. The main takeaway is that control over the login screen grows with the ongoing maintenance you accept.
| Option | What the team controls | Login methods covered | Ongoing ownership | When it fits |
|---|---|---|---|---|
| Hosted branding | Logo, colors and some text in the hosted login, set through instance or organization settings | Confirm each method (password, passkey, MFA, external IdP) against your Zitadel version and hosted login behavior | Zitadel operates the login pages; you maintain branding settings only | Brand changes are enough and the login flow itself can stay standard |
| Forked Login UI deployed by you | Source of the Next.js Login UI, its layout, copy, flow logic and hosting | Inherits the methods the forked release supports; confirm each one for the tag you fork | Your team builds, secures, hosts and updates the application after each change | You need deeper UI changes but still want the maintained login flows as a starting point |
| Custom front end on the session API | Entire login interface, screen sequence and error handling, with your own code | Only the methods you implement against the session API; confirm the API surface for your version | Your team owns the application, its security review and every Zitadel API change | Your login journey differs substantially and you can staff ongoing development and testing |
| Login client credentials | Service account or client used by your login application to call Zitadel | Not applicable to the methods themselves; scope it to the permissions the login flows require | Rotation and secret storage stay with your team in every option that you host | Required whenever you run your own login application, so plan it for each option |
How the custom login app, session API and Zitadel fit together
The flow starts in the user's browser, which is sent to the custom login application rather than Zitadel's hosted login. That application calls the Zitadel session API to check passwords, passkeys, MFA and external identity providers on the user's behalf, using its own login client credentials. The trust boundary sits between the login app and Zitadel: the app holds a service credential that must be scoped, stored and rotated like any other secret. Check that the session API only ever acts inside the organization the user belongs to.
Browser, custom login app, session API and the Zitadel instance with its external providers.
What the session API must handle: passwords, passkeys, MFA and external IdPs
A custom Login UI is a set of screens that call the session API in a defined order. The cards below cover the four login paths the UI has to orchestrate, plus the sequencing logic that ties them together.
Password login
Password is the baseline factor that most custom flows start with. Your UI collects the login name, creates a session, then submits the password against that session. Check how the UI handles wrong-password responses, account lockout feedback and the case where a user must change a password before the session completes. Confirm the exact session API calls and their request fields for your Zitadel version before writing the screens.
Login UI fork guidePasskeys with password fallback
Passkeys are FIDO2 and WebAuthn credentials, and Zitadel supports passwordless login with a fallback to password login. Your UI must decide when to offer the passkey prompt, how it recovers when the browser or authenticator is unavailable, and how the fallback path is presented so users are not stuck. Test on each browser and authenticator type your users actually carry, and confirm which WebAuthn challenge calls the session API expects in your release.
Passkeys docsSecond factors and MFA prompts
After the primary factor, the session may require a second factor, depending on the login policy of the organization. Your UI has to read which factors are available for the user, render each one, and handle enrollment for users who have none yet. Decide whether enrollment happens inline or in a separate flow. Confirm with your policy owner which factors are permitted per organization, since the session API only reports what the policy allows.
Federated logins to external IdPs
Users of a customer organization may sign in through that organization's identity provider instead of a local password. The UI must start the external flow, return to the session with the provider result, and handle the first sign-in where the user is created or linked. Test each provider type you intend to support, including the case where an organization has no federated provider configured and the case where a provider returns an error or a missing email claim.
Identity providers docsOrchestrating the login steps
The hardest part of a custom UI is not any single screen but the order of steps. The UI must track session state across password, passkey, MFA and federated steps, resume after a page reload, and redirect back to the OIDC authorization request only when the session is fully authenticated. Map every state transition, define what happens on timeout or abandoned flows, and write tests that cover each path through the state machine.
How to fork, deploy and connect a custom login UI
This sequence takes a team from a chosen Zitadel release to a forked Login UI that runs against their instance, authenticates through the session API, and passes a test for each login method they plan to offer.
Pick a Zitadel release tag
Choose the release tag your self-hosted Zitadel instance runs or will run, and fork the Login UI from that same tag so the front end and the server speak the same version of the session API. Confirm the tag against the release notes on the zitadel/zitadel GitHub releases page and record the version in your change log. The step is done when the team can name the tag, the Zitadel server version in each environment, and the owner of future version bumps. Mismatched versions are a common cause of failures at this stage, so check them before any code is copied.
Fork the Zitadel repository at that tag
Fork the whole Zitadel monorepo rather than copying only the Login UI folder, because the Login UI is a Next.js application inside that repository and depends on code in it. Your engineers, or the DeployOpen team working under your repository policy, create the fork, check out the release tag, and create a branch for your customizations. Keep the upstream remote so security fixes and later tags can be merged deliberately. The step is done when the branch builds locally with no modifications and the team can show the upstream remote and tag in the repository.
Create the login client with the required permissions
In the Zitadel Console, create the service account or client that the Login UI uses to call the session API, and grant it only the permissions the login flows need. Store the client credentials in your secrets manager, not in the repository or image. Test the credentials with a single session API call from a shell before the app depends on them. The step is done when that call succeeds and a credential rotation procedure is written down. Confirm the exact permission names against the Zitadel documentation for your release, since they change between versions.
Configure application URLs and environment
Set the Zitadel issuer URL, the Login UI base URL, the callback and redirect targets, and the client credentials through environment variables that match your deployment model. Make sure the public login domain, the TLS certificate and the allowed origins line up with the domain your Zitadel instance is configured to use, because mismatches here usually surface as redirect or cookie errors. The step is done when the app starts with the configuration loaded and logs show it resolving the Zitadel issuer without errors.
Build and deploy the login application
Build the Next.js application from your fork and deploy it to the environment you use for the rest of Zitadel, whether a Kubernetes cluster, a container host or a server you control. Put it behind the same TLS and reverse proxy path your identity domain uses, and apply your container image scanning and patching process to it, since it is now an application your team must build, secure and update. The step is done when the deployed app serves the login page over HTTPS and its image is recorded with a version and digest.
Confirm the app reaches the session API
Load the login page in a browser and watch the server logs and network traffic to confirm that the app creates and reads sessions through the Zitadel session API using the login client. Check that no login client secret appears in browser responses or client-side bundles. The step is done when a login attempt reaches the session API, returns the expected session state, and the logs show no authorization failures for the login client.
Test password, passkey, MFA and external IdP logins
Using test users in a non-production instance, run each login path you plan to offer: password with and without the second factor, passkey sign-in with password fallback, the MFA prompts your login policy requires, and each external identity provider you connect. Record the result of each path, including failed attempts and lockout behavior. The step is done when every path has a passing test with a named tester and a date, and any path that cannot be completed is either fixed or removed from the offered list.
Set up a process for upstream updates
Document how the team will track new Zitadel releases, merge upstream changes into the fork, rebuild the app, and retest the login paths from the previous step before each production change. Assign an owner and agree where the test evidence is kept. The step is done when the update procedure is written, the owner has signed off on it, and a dry run of merging the next upstream tag has been scheduled, so the fork does not drift from the server it serves.
Security considerations for a self-built login app
A custom login UI moves part of the authentication surface into code your team builds and runs. The cards below cover the parts that become your responsibility once you fork the Login UI, and the checks that keep your app aligned with Zitadel's own security settings.
Client credential storage and scope
The login app authenticates to Zitadel with its own client credentials, so a leaked secret lets an attacker call the session API as your login app. Keep the secret in a secrets manager or Kubernetes secret, never in the client bundle or the repository. Give the login client only the permissions the login flows need, and rotate the secret on a schedule you can name in your runbook. Confirm the exact scopes your fork requests against the current fork guide.
Fork and deploy guideSession handling and cookies
Your Next.js app holds the session that proves a user has signed in, so cookie attributes decide who can steal it. Review that session cookies are marked HttpOnly and Secure, carry a SameSite policy that fits your redirect flows, and have a lifetime that matches your login policy. Test logout end to end so the local cookie and the Zitadel session are both cleared.
Rate limiting and lockout ownership
Once the login screens are yours, brute-force protection is only as strong as the layer you put in front of them. Decide whether lockout and throttling live in Zitadel's login policy, at your edge proxy, or in the app, and document which layer answers each attack. A gap between layers is where credential stuffing gets through. Test the failure path, not only the happy path.
Dependency patching for a Next.js app
A fork turns the Login UI into an application your team must patch. Next.js and its Node.js runtime, along with every npm dependency, need a named owner, a monitored advisory feed and a rebuild cadence. Pin the release tag you forked from, then track upstream Zitadel releases so you can merge security fixes into the login code. Ask who is paged when a critical Next.js advisory lands on a weekend.
Keeping the UI aligned with Zitadel
Your custom screens must keep honoring the security settings configured in Zitadel, such as allowed second factors, password complexity, passkey behavior and federated login routing. If a screen skips a policy check or offers a method the instance has disabled, users can reach states administrators did not intend. Build an alignment test that runs the login flows against each policy setting after every upgrade.
Testing the login surface
Login flows are where authentication mistakes hide, so they need their own test plan. Cover password, passkey, MFA, external identity provider and recovery paths, plus redirect handling that could enable open redirects. Include negative tests such as expired sessions, replayed callbacks and changed parameters. Record the results so an auditor or security reviewer can see what was tested and when.
What maintaining a fork costs over time
Forking the Login UI turns it into an application your team owns. Zitadel's guidance is explicit on this point: a fork becomes an application the team must build, secure and update. The launch is the cheapest part. The recurring cost is the work that keeps a forked login page safe and compatible with the Zitadel release you run, because the login page is where passwords, passkeys, MFA prompts and external identity provider redirects all pass through. Before you commit, ask who on your team owns that queue and whether they have the Next.js and TypeScript skills to carry it.
Each new Zitadel release means rebasing your fork onto the new release tag and resolving conflicts in every file you changed. The changes that hurt most are the ones that touch session API calls, error handling and the flows for passkeys, MFA enrollment and external identity provider callbacks, because a change there can break a login path without any visible error on the page. Plan for release tracking, a dependency update cycle for the Next.js framework and its packages, and a regression test pass that exercises every login path your organization offers: password, passkey, each second factor, each federated provider, password reset and registration if enabled. Confirm the current release cadence and the upgrade notes for each release before you set a schedule.
Hosting and security run alongside the code work. Your fork needs its own build pipeline, container images, TLS, logging and a place in your vulnerability management program, and it sits on the path of every user sign-in, so an outage there blocks access to every application behind Zitadel. Ask any partner quoting this work to separate one-time setup from recurring tasks, to name who performs each recurring task, and to state how security patches to the Login UI dependencies are triaged and deployed. Compare that recurring estimate with the cost of staying on the hosted login and using branding and policy settings, since that path leaves the upgrade work with the vendor.
Limits to confirm before committing to a custom login UI
A custom Login UI sits on top of a session API, a license and a database that your team will own after launch. Each card below names one limit to verify in your environment before you commit to building or forking the login experience.
Session API coverage by version
Confirm that the Zitadel version you plan to run exposes every session API feature your login flows need, including password, passkey, MFA and external IdP steps. Feature coverage moves between releases, so test each flow against the exact version in staging, not against the newest documentation. Pin the release tag you fork from, and record which flows you tested on it.
Login UI fork guideLicensing of the core and the Login UI
The Login UI is MIT-licensed, but Zitadel's core, Console and hosted login moved to AGPL 3.0 with v3.0. Ask legal whether a modified Login UI deployed as a network service creates obligations under the AGPL for the surrounding code, and whether your fork stays separate from the core. Keep the Login UI in its own repository so license boundaries are easy to show in a review.
- AGPL change date
- 31 March 2025
PostgreSQL and self-hosting prerequisites
Your custom login app depends on the Zitadel instance behind it, and that instance depends on PostgreSQL. Confirm that your database platform supports the versions Zitadel documents for your release, and plan for high availability, backups and upgrades of the database before the login app goes live. Login failures during a database incident will look like login UI bugs, so define who owns that triage.
- Supported PostgreSQL versions
- 14 to 18
Deployment target for the login app
Decide where the forked Next.js application runs and how it reaches the Zitadel API, including TLS, domain names and network paths between the login app and the identity service. Confirm that your platform team can build container images, run them with secrets injected at runtime, and roll them back independently of Zitadel itself. Document the URL the browser sees, because redirects and cookies depend on it.
Self-hosting overviewLogin client credentials and secret handling
The custom login app authenticates to the session API with its own client credentials, which are separate from the credentials your applications use. Confirm who issues them, where they are stored, how they rotate and which permissions the login client holds. A leaked login client credential can drive sign-in flows for every user in the instance, so treat it as a high-value secret in your vault.
Staffing for ongoing upkeep
A fork becomes an application your team must build, secure and update. Name the engineers who will track Zitadel release tags, merge upstream changes, rerun login tests and patch dependencies of the Next.js app on a schedule. If that group does not exist, or cannot absorb security fixes within your change window, the simpler path is branding and hosted login, or a retainer with a partner that covers the upkeep in writing.
Questions teams ask before building a custom Zitadel login UI
What does a custom Zitadel login UI cost to build and run?
Cost comes from three places: the build effort, the ongoing maintenance of the forked application, and the infrastructure that hosts it. Build effort rises with the number of screens you replace, the flows you rebuild (passwords, passkeys, MFA, external identity providers) and the testing you need before go-live. Maintenance is recurring because a fork is an application your team must build, secure and update. No price figure is supplied for this work, so ask any partner for a quote built from a written scope that lists each screen, flow, environment and support period. Compare that quote with the cost of staying on the hosted login and changing only branding.
How long does a custom login UI build take?
The timeline depends mainly on how many authentication flows you rebuild and how many environments and identity providers you must test against. A login UI that only changes colors and logos is a much smaller job than one that replaces password, passkey, MFA and federated sign-in screens on the session API. Other drivers include your security review, accessibility testing, translation needs and how much your identity configuration is still changing. No duration is supplied for this work, so ask for a milestone plan in the written scope with a named acceptance test for each flow before you agree a date.
What does the customer team need to provide for the build?
The customer team provides the Zitadel environment the login app will call, the login client credentials, the design system and brand assets, and decisions about which sign-in methods each organization allows. Engineers need access to a self-hosted Zitadel instance and a deployment target for the Next.js application, plus owners for DNS, TLS and secrets. Security reviewers should define how the login app is hardened, logged and patched. Plan for a named product owner who can approve screen behavior, since every choice about lockout messages, error text and MFA prompts affects users and support teams.
Can our own engineers build and run a custom login UI in-house?
Yes, if your team has frontend engineers who know Next.js, and engineers who understand OIDC, the session API and secure session handling. The MIT-licensed Login UI is a Next.js application in the Zitadel monorepo, and Zitadel advises forking the whole repository from a release tag. The harder part is not the first build. It is the ongoing work: keeping the fork current with Zitadel releases, reviewing security changes and maintaining tests across flows. Ask whether your team can commit to that cadence for the life of the product, and whether a partner would take on the build, the handover or the continuing maintenance.
How do upgrades work when we run a forked login UI?
Upgrades are your responsibility once you fork. You must track Zitadel releases, such as the v4.19.5 release published on 15 October 2026, and check whether the session API, the login flows or the Login UI code changed. Each upgrade needs a rebuild of the fork, regression tests for every sign-in method, and a deployment window that does not break existing sessions. Plan for a staging environment that runs the same Zitadel version as production. Ask any partner to describe its upgrade process, including how it handles breaking changes and who signs off each release.
Is branding enough, or do we need a custom login UI?
Branding is enough when your sign-in screens only need your logo, colors and text, and the standard flows already fit your users. A custom login UI makes sense when you need different screen layouts per customer, custom steps in the sign-in journey, a bespoke onboarding or consent flow, or behavior the hosted login does not offer. Test this against your requirements before you fork: list each screen and each flow, mark which ones branding can change, and mark the rest. Any item left over is a candidate for a custom build, and it is the list you should send to a partner for scoping.
How does the AGPL license change affect a fork of the login UI?
The Login UI is MIT-licensed, so it is a different case from the core, Console and hosted login, which Zitadel moved from Apache 2.0 to the GNU Affero General Public License 3.0 with v3.0 on 31 March 2025. Your fork of the MIT-licensed Login UI carries MIT terms, but you should confirm with your legal team how the surrounding Zitadel components you run are licensed, including the AGPL terms that apply when you modify and offer them over a network. Zitadel states that APIs, SDKs, proto definitions and examples remain Apache 2.0. Get written legal advice before you publish a modified copy or offer it to customers.
How DeployOpen scopes and supports a custom Zitadel login UI
DeployOpen approaches a custom Zitadel login UI as a defined application with its own scope, build, handover and support plan. We start from the login flows your users actually need, then decide with you whether the work stays a branded configuration or becomes a forked Login UI that your team must own. Engagements are fixed-scope, with the written scope agreed before build work begins.
How we scope
- Inventory every login path, including password, passkey, MFA prompts and each external identity provider per organization
- Decide whether branding settings are enough or a fork of the Login UI is justified, and record the reason
- Agree in writing which session API flows, screens, environments and test cases the fixed scope covers
How we build
- Fork the Zitadel monorepo from the release tag you run in production, so the Login UI matches your server version
- Build the session API calls for passwords, passkeys, MFA and external IdP redirects, and test each path separately
- Configure the login client credentials with the least permissions needed and keep them out of source control
How we hand over
- Document the fork's build, deployment, configuration and upgrade steps so your engineers can run it without us
- Provide a test suite covering each login flow and the failure states users are likely to hit
- Record which upstream changes to the Login UI must be reviewed before each Zitadel version upgrade
How we support
- Offer ongoing support, upgrades and continuous testing for the fork as a retainer, priced separately from the build
- Retest the login flows after each Zitadel release you adopt, including security-relevant changes
- Agree the support boundary in writing, covering who patches the application, dependencies and hosting

