Bumps the go_modules group with 1 update in the /login/apps/login-test-acceptance/idp/oidc directory: [github.com/go-chi/chi/v5](https://github.com/go-chi/chi). Updates `github.com/go-chi/chi/v5` from 5.2.1 to 5.2.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/go-chi/chi/releases">github.com/go-chi/chi/v5's releases</a>.</em></p> <blockquote> <h2>v5.2.2</h2> <h2>What's Changed</h2> <ul> <li>Use strings.Cut in a few places by <a href="https://github.com/JRaspass"><code>@JRaspass</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/971">go-chi/chi#971</a></li> <li>Fix non-constant format strings in t.Fatalf by <a href="https://github.com/JRaspass"><code>@JRaspass</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/972">go-chi/chi#972</a></li> <li>Apply fieldalignment fixes to optimize struct memory layout by <a href="https://github.com/pixel365"><code>@pixel365</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/974">go-chi/chi#974</a></li> <li>go 1.24 by <a href="https://github.com/pkieltyka"><code>@pkieltyka</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/977">go-chi/chi#977</a></li> <li>chore: delint ioutil usage by <a href="https://github.com/costela"><code>@costela</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/962">go-chi/chi#962</a></li> <li>Fixed typo in Router interface definition by <a href="https://github.com/mithileshgupta12"><code>@mithileshgupta12</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/958">go-chi/chi#958</a></li> <li>Add support for TinyGo by <a href="https://github.com/efraimbart"><code>@efraimbart</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/978">go-chi/chi#978</a></li> <li>Exclude middleware/profiler.go in TinyGo, as there's no net/http/pprof pkg by <a href="https://github.com/cxjava"><code>@cxjava</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/982">go-chi/chi#982</a></li> <li>Make use of strings.Cut by <a href="https://github.com/scop"><code>@scop</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/1005">go-chi/chi#1005</a></li> <li>Change install command format to code block by <a href="https://github.com/sglkc"><code>@sglkc</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/1001">go-chi/chi#1001</a></li> <li>Correct documentation by <a href="https://github.com/mrdomino"><code>@mrdomino</code></a> in <a href="https://redirect.github.com/go-chi/chi/pull/992">go-chi/chi#992</a></li> </ul> <h2>Security fix</h2> <ul> <li>Fixes <a href="https://github.com/go-chi/chi/security/advisories/GHSA-vrw8-fxc6-2r93">GHSA-vrw8-fxc6-2r93</a> - "Host Header Injection Leads to Open Redirect in RedirectSlashes" <a href="https://github.com/go-chi/chi/commit/1be7ad938cc9c5b39a9dea01a5c518848928ab65">commit</a> <ul> <li>a lower-severity Open Redirect that can't be exploited in browser or email client, as it requires manipulation of a Host header</li> <li>reported by Anuraag Baishya, <a href="https://github.com/anuraagbaishya"><code>@anuraagbaishya</code></a>. Thank you!</li> </ul> </li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/pixel365"><code>@pixel365</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/974">go-chi/chi#974</a></li> <li><a href="https://github.com/mithileshgupta12"><code>@mithileshgupta12</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/958">go-chi/chi#958</a></li> <li><a href="https://github.com/efraimbart"><code>@efraimbart</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/978">go-chi/chi#978</a></li> <li><a href="https://github.com/cxjava"><code>@cxjava</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/982">go-chi/chi#982</a></li> <li><a href="https://github.com/sglkc"><code>@sglkc</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/1001">go-chi/chi#1001</a></li> <li><a href="https://github.com/mrdomino"><code>@mrdomino</code></a> made their first contribution in <a href="https://redirect.github.com/go-chi/chi/pull/992">go-chi/chi#992</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2">https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/go-chi/chi/commit/23c395f8524a30334126ca16fb4d37b88745b9b9"><code>23c395f</code></a> Correct documentation (<a href="https://redirect.github.com/go-chi/chi/issues/992">#992</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/5516d147c14a2b03824be7076fc6200bed906901"><code>5516d14</code></a> docs: change install code to code block (<a href="https://redirect.github.com/go-chi/chi/issues/1001">#1001</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/e235052c10146fb724439442fc9d9a23e19fe931"><code>e235052</code></a> Make use of strings.Cut (<a href="https://redirect.github.com/go-chi/chi/issues/1005">#1005</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/1be7ad938cc9c5b39a9dea01a5c518848928ab65"><code>1be7ad9</code></a> Merge commit from fork</li> <li><a href="https://github.com/go-chi/chi/commit/d7034fdfdaefd10f1bc1a7b813bc979f2eda3a36"><code>d7034fd</code></a> Exclude profiler when use tinygo (<a href="https://redirect.github.com/go-chi/chi/issues/982">#982</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/d04703412f631922c8dd1527c6500627174828c1"><code>d047034</code></a> support tinygo (<a href="https://redirect.github.com/go-chi/chi/issues/978">#978</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/fe2c065bc046056aecfa141022509a1e25bdd04b"><code>fe2c065</code></a> Fixed the typo (<a href="https://redirect.github.com/go-chi/chi/issues/958">#958</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/1aae5b2d2dc8f9e8ea1f68a7462693aaaa5f368c"><code>1aae5b2</code></a> chore: delint ioutil usage (<a href="https://redirect.github.com/go-chi/chi/issues/962">#962</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/c6225e35a4880a9a884c135b5f847a74e1e3a01e"><code>c6225e3</code></a> go 1.24 (<a href="https://redirect.github.com/go-chi/chi/issues/977">#977</a>)</li> <li><a href="https://github.com/go-chi/chi/commit/e846b8304c769c4f1a51c9de06bebfaa4576bd88"><code>e846b83</code></a> Apply fieldalignment fixes to optimize struct memory layout (<a href="https://redirect.github.com/go-chi/chi/issues/974">#974</a>)</li> <li>Additional commits viewable in <a href="https://github.com/go-chi/chi/compare/v5.2.1...v5.2.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/zitadel/zitadel/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ZITADEL TypeScript with Turborepo
This repository contains all TypeScript and JavaScript packages and applications you need to create your own ZITADEL Login UI.
⚠️ This repo and packages are in beta state and subject to change ⚠️
The scope of functionality of this repo and packages is under active development.
The @zitadel/client package is using @connectrpc/connect.
You can read the contribution guide on how to contribute. Questions can be raised in our Discord channel or as a GitHub issue.
Developing Your Own ZITADEL Login UI
We think the easiest path of getting up and running, is the following:
- Fork and clone this repository
- Run the ZITADEL Cloud login UI locally
- Make changes to the code and see the effects live on your local machine
- Study the rest of this README.md and get familiar and comfortable with how everything works.
- Decide on a way of how you want to build and run your login UI. You can reuse ZITADEL Clouds way. But if you need more freedom, you can also import the packages you need into your self built application.
Included Apps And Packages
login: The login UI used by ZITADEL Cloud, powered by Next.js@zitadel/client: shared client utilities for node and browser environments@zitadel/proto: Protocol Buffers (proto) definitions used by ZITADEL projects@zitadel/tsconfig: sharedtsconfig.jsons used throughout the monorepo@zitadel/eslint-config: ESLint preset
Each package and app is 100% TypeScript.
Login
The login is currently in a work in progress state. The goal is to implement a login UI, using the session API of ZITADEL, which also implements the OIDC Standard and is ready to use for everyone.
In the first phase we want to have a MVP login ready with the OIDC Standard and a basic feature set. In a second step the features will be extended.
This list should show the current implementation state, and also what is missing. You can already use the current state, and extend it with your needs.
Features list
-
Local User Registration (with Password)
-
User Registration and Login with external Provider
- GitHub
- GitHub Enterprise
- GitLab
- GitLab Enterprise
- Azure
- Apple
- Generic OIDC
- Generic OAuth
- Generic JWT
- LDAP
- SAML SP
-
Multifactor Registration an Login
- Passkeys
- TOTP
- OTP: Email Code
- OTP: SMS Code
-
Password Change/Reset
-
Domain Discovery
-
Branding
-
OIDC Standard
- Authorization Code Flow with PKCE
- AuthRequest
hintUserId - AuthRequest
loginHint - AuthRequest
prompt- Login
- Select Account
- Consent
- Create
- Scopes
- `openid email profile address``
offline accessurn:zitadel:iam:org:idp:id:{idp_id}urn:zitadel:iam:org:project:id:zitadel:audurn:zitadel:iam:org:id:{orgid}urn:zitadel:iam:org:domain:primary:{domain}
- AuthRequest UI locales
Flow diagram
This diagram shows the available pages and flows.
Note that back navigation or retries are not displayed.
flowchart TD
A[Start] --> register
A[Start] --> accounts
A[Start] --> loginname
loginname -- signInWithIDP --> idp-success
loginname -- signInWithIDP --> idp-failure
idp-success --> B[signedin]
loginname --> password
loginname -- hasPasskey --> passkey
loginname -- allowRegister --> register
passkey-add --passwordAllowed --> password
passkey -- hasPassword --> password
passkey --> B[signedin]
password -- hasMFA --> mfa
password -- allowPasskeys --> passkey-add
password -- reset --> password-set
email -- reset --> password-set
password-set --> B[signedin]
password-change --> B[signedin]
password -- userstate=initial --> password-change
mfa --> otp
otp --> B[signedin]
mfa--> u2f
u2f -->B[signedin]
register -- password/passkey --> B[signedin]
password --> B[signedin]
password-- forceMFA -->mfaset
mfaset --> u2fset
mfaset --> otpset
u2fset --> B[signedin]
otpset --> B[signedin]
accounts--> loginname
password -- not verified yet -->verify
register-- withpassword -->verify
passkey-- notVerified --> verify
verify --> B[signedin]
You can find a more detailed documentation of the different pages here.
Custom translations
The new login uses the SettingsApi to load custom translations.
Translations can be overriden at both the instance and organization levels.
To find the keys more easily, you can inspect the HTML and search for a data-i18n-key attribute, or look at the defaults in /apps/login/locales/[locale].ts.

Tooling
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
Useful Commands
make login-quality- Check the quality of your code against a production build without installing any dependencies besides Dockerpnpm generate- Build proto stubs for the client packagepnpm dev- Develop all packages and the login apppnpm build- Build all packages and the login apppnpm clean- Clean up allnode_modulesanddistfolders (runs each package's clean script)
Learn more about developing the login UI in the contribution guide.
Versioning And Publishing Packages
Package publishing has been configured using Changesets. Here is their documentation for more information about the workflow.
The GitHub Action needs an NPM_TOKEN and GITHUB_TOKEN in the repository
settings. The Changesets bot should also be installed on the GitHub repository.
Read the changesets documentation for more information about this automation
Run Login UI
To run the application make sure to install the dependencies with
pnpm install
then generate the GRPC stubs with
pnpm generate
To run the application against a local ZITADEL instance, run the following command:
pnpm run-zitadel
This sets up ZITADEL using docker compose and writes the configuration to the file apps/login/.env.local.
Alternatively, use another environment
You can develop against any ZITADEL instance in which you have sufficient rights to execute the following steps. Just create or overwrite the file `apps/login/.env.local` yourself. Add your instances base URL to the file at the key `ZITADEL_API_URL`. Go to your instance and create a service user for the login application. The login application creates users on your primary organization and reads policy data. For the sake of simplicity, just make the service user an instance member with the role `IAM_OWNER`. Create a PAT and copy it to the file `apps/login/.env.local` using the key `ZITADEL_SERVICE_USER_TOKEN`.The file should look similar to this:
ZITADEL_API_URL=https://zitadel-tlx3du.us1.zitadel.cloud
ZITADEL_SERVICE_USER_TOKEN=1S6w48thfWFI2klgfwkCnhXJLf9FQ457E-_3H74ePQxfO3Af0Tm4V5Xi-ji7urIl_xbn-Rk
Start the login application in dev mode:
pnpm dev
Open the login application with your favorite browser at localhost:3000.
Change the source code and see the changes live in your browser.
Make sure the application still behaves as expected by running all tests
pnpm test
To satisfy your unique workflow requirements, check out the package.json in the root directory for more detailed scripts.
Run Login UI Acceptance tests
To run the acceptance tests you need a running ZITADEL environment and a component which receives HTTP requests for the emails and sms's. This component should also be able to return the content of these notifications, as the codes and links are used in the login flows. There is a basic implementation in Golang available under the sink package.
To setup ZITADEL with the additional Sink container for handling the notifications:
pnpm run-sink
Then you can start the acceptance tests with:
pnpm test:acceptance
Deploy to Vercel
To deploy your own version on Vercel, navigate to your instance and create a service user. Then create a personal access token (PAT), copy and set it as ZITADEL_SERVICE_USER_TOKEN, then navigate to your instance settings and make sure it gets IAM_OWNER permissions. Finally set your instance url as ZITADEL_API_URL. Make sure to set it without trailing slash.