Login UI for the Canonical identity broker and identity provider solution
22
stars
1,767
commits
Go
primary language
Sep 4, 2026
updated
This is the UI for the Canonical Identity Platform.
To create a binary with the UI you need to run:
make npm-build build
Please don't run them in parallel, build requires the target cmd/ui/dist
which, unless the js code has been build independently, requires npm-build
If you want to skip the npm-build make sure the js artifacts are in
the ui/dist folder (check the Makefile for more advanced information).
This will:
js codeapp which you can run with:PORT=<port number> ./cmd/app
Code dealing with the environment variables resides in here where each attribute has an annotation which is the lowercase of the environment variable name.
At the moment the application is sourcing the following from the environment:
OTEL_GRPC_ENDPOINT - needed if we want to use the OTel gRPC exporter for
tracesOTEL_HTTP_ENDPOINT - needed if we want to use the OTel HTTP exporter for
traces (if gRPC is specified this gets unused)TRACING_ENABLED - switch for tracing, defaults to enabled (true)LOG_LEVEL - log level, defaults to errorLOG_FILE - log file which the log rotator will write into. default to
log.txt. Make sure application user has permissions to write.PORT - HTTP server port, defaults to 8080BASE_URL - the base url that the application will be running onCOOKIES_ENCRYPTION_KEY: 32 bytes string used for encrypting cookiesKRATOS_PUBLIC_URL - address of Kratos Public APIsKRATOS_ADMIN_URL - address of Kratos Admin APIsHYDRA_ADMIN_URL - address of Hydra admin APIsOPENFGA_API_SCHEME - the OpenFGA API schemeOPENFGA_API_HOST - the OpenFGA API host nameOPENFGA_STORE_ID - the OpenFGA store ID to useOPENFGA_MODEL_ID - the OpenFGA model ID to use. If not specified, a new
model will be createdMFA_ENABLED - whether MFA is enabled and enforced, defaults to trueIDENTIFIER_FIRST_ENABLED - whether login flow follows the identifier-first pattern, defaults to trueFEATURE_FLAGS - comma separated list (no spaces) of feature flags allowing to activate "self service" pages (values allowed: password,webauthn,backup_codes,totp,account_linking)To build the UI OCI image, you need rockcraft. To install rockcraft run:
sudo snap install rockcraft --channel=latest/edge --classic
To build the image:
rockcraft pack
In order to run the produced image with docker:
# Import the image to Docker
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy \
copy oci-archive:./identity-platform-login-ui_0.1_amd64.rock \
docker-daemon:localhost:32000/identity-platform-login-ui:registry
# Run the image
docker run -d \
-it \
--rm \
-p 8080:8080 \
--name login-ui \
localhost:32000/identity-platform-login-ui:registry start login-ui
To try the identity-platform login UI, you can use the docker-compose.yml.
Please install docker and docker-compose.
You need to have a registered GitHub OAuth application to use for logging in. To register a GitHub OAuth application:
http://localhost:4433/self-service/methods/oidc/callback/github..env on the root of the repository and paste your
client credentials:CLIENT_ID=<client_id>
CLIENT_SECRET=<client_secret>
From the root folder of the repository, run the docker-compose:
docker compose up
To test the authorization code flow you can use the Ory Hydra CLI:
To install the Ory Hydra CLI follow the instructions.
code_client=$(hydra create client \
--endpoint http://localhost:4445 \
--name "Some App" \
--grant-type authorization_code,refresh_token \
--response-type code \
--format json \
--scope openid,offline_access,email,profile \
--redirect-uri http://127.0.0.1:4446/callback \
--audience app_client \
)
hydra perform authorization-code \
--endpoint http://localhost:4444 \
--client-id `echo "$code_client" | yq .client_id` \
--client-secret `echo "$code_client" | yq .client_secret` \
--scope openid,profile,email,offline_access
Please see SECURITY.md for guidelines on reporting security issues.
Go
74.6%
TypeScript
21.6%
Go Template
2.2%
Login UI for the Canonical identity broker and identity provider solution
22
stars
1,767
commits
Go
primary language
Sep 4, 2026
updated
This is the UI for the Canonical Identity Platform.
To create a binary with the UI you need to run:
make npm-build build
Please don't run them in parallel, build requires the target cmd/ui/dist
which, unless the js code has been build independently, requires npm-build
If you want to skip the npm-build make sure the js artifacts are in
the ui/dist folder (check the Makefile for more advanced information).
This will:
js codeapp which you can run with:PORT=<port number> ./cmd/app
Code dealing with the environment variables resides in here where each attribute has an annotation which is the lowercase of the environment variable name.
At the moment the application is sourcing the following from the environment:
OTEL_GRPC_ENDPOINT - needed if we want to use the OTel gRPC exporter for
tracesOTEL_HTTP_ENDPOINT - needed if we want to use the OTel HTTP exporter for
traces (if gRPC is specified this gets unused)TRACING_ENABLED - switch for tracing, defaults to enabled (true)LOG_LEVEL - log level, defaults to errorLOG_FILE - log file which the log rotator will write into. default to
log.txt. Make sure application user has permissions to write.PORT - HTTP server port, defaults to 8080BASE_URL - the base url that the application will be running onCOOKIES_ENCRYPTION_KEY: 32 bytes string used for encrypting cookiesKRATOS_PUBLIC_URL - address of Kratos Public APIsKRATOS_ADMIN_URL - address of Kratos Admin APIsHYDRA_ADMIN_URL - address of Hydra admin APIsOPENFGA_API_SCHEME - the OpenFGA API schemeOPENFGA_API_HOST - the OpenFGA API host nameOPENFGA_STORE_ID - the OpenFGA store ID to useOPENFGA_MODEL_ID - the OpenFGA model ID to use. If not specified, a new
model will be createdMFA_ENABLED - whether MFA is enabled and enforced, defaults to trueIDENTIFIER_FIRST_ENABLED - whether login flow follows the identifier-first pattern, defaults to trueFEATURE_FLAGS - comma separated list (no spaces) of feature flags allowing to activate "self service" pages (values allowed: password,webauthn,backup_codes,totp,account_linking)To build the UI OCI image, you need rockcraft. To install rockcraft run:
sudo snap install rockcraft --channel=latest/edge --classic
To build the image:
rockcraft pack
In order to run the produced image with docker:
# Import the image to Docker
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy \
copy oci-archive:./identity-platform-login-ui_0.1_amd64.rock \
docker-daemon:localhost:32000/identity-platform-login-ui:registry
# Run the image
docker run -d \
-it \
--rm \
-p 8080:8080 \
--name login-ui \
localhost:32000/identity-platform-login-ui:registry start login-ui
To try the identity-platform login UI, you can use the docker-compose.yml.
Please install docker and docker-compose.
You need to have a registered GitHub OAuth application to use for logging in. To register a GitHub OAuth application:
http://localhost:4433/self-service/methods/oidc/callback/github..env on the root of the repository and paste your
client credentials:CLIENT_ID=<client_id>
CLIENT_SECRET=<client_secret>
From the root folder of the repository, run the docker-compose:
docker compose up
To test the authorization code flow you can use the Ory Hydra CLI:
To install the Ory Hydra CLI follow the instructions.
code_client=$(hydra create client \
--endpoint http://localhost:4445 \
--name "Some App" \
--grant-type authorization_code,refresh_token \
--response-type code \
--format json \
--scope openid,offline_access,email,profile \
--redirect-uri http://127.0.0.1:4446/callback \
--audience app_client \
)
hydra perform authorization-code \
--endpoint http://localhost:4444 \
--client-id `echo "$code_client" | yq .client_id` \
--client-secret `echo "$code_client" | yq .client_secret` \
--scope openid,profile,email,offline_access
Please see SECURITY.md for guidelines on reporting security issues.
Go
74.6%
TypeScript
21.6%
Go Template
2.2%