# login.lumbung.space

[![Build Status](https://drone.autonomic.zone/api/badges/ruangrupa/login.lumbung.space/status.svg?ref=refs/heads/main)](https://drone.autonomic.zone/ruangrupa/login.lumbung.space)

> [login.lumbung.space](https://login.lumbung.space)

[Custom theming](https://www.keycloak.org/docs/latest/server_development/index.html#_themes) for the Keycloak SSO service.

Please see [default-themes/README.md](./default-themes/README.md) and [lumbung.space/README.md](./lumbung.space/README.md) for more info.

## Deployment

Just send commits and the [Drone CI/CD configuration](./.drone.yml) will take care of the rest.

## Custom theming workflow

You'll need a local [Docker](https://docs.docker.com/engine/install/debian/) installation.

Then run a local Keycloak instance and mount the theme into the container with the following ([makefile source](./makefile)):

```
$ make
```

An example workflow for customising the login theme would be:

- Log into [localhost:8080](http://localhost:8080) with username: `admin` and password: `admin`
- Go to [Realm Settings > Themes](http://localhost:8080/auth/admin/master/console/#/realms/master/theme-settings)
- Choose a custom login theme via Login Theme > lumbung.space and click Save
- Sign out and you'll be redirected to the login page
- Now, test you can make an edit and it is reflected on reload, change the "Username or email" string in [mesages_en.properties](./lumbung.space/login/messages/messages_en.properties)
- Reload the page, your change should be live

See related documentation and tutorials for the hacking:

- [Create a custom theme for Keycloak](https://auscunningham.medium.com/create-a-custom-theme-for-keycloak-8781207be604)
- [Change Login Theme in Keycloak Docker image](https://austincunningham.ddns.net/2020/changekeycloakdockertheme)
- [Keycloak themes documentation](https://www.keycloak.org/docs/latest/server_development/index.html#_themes)
- [Keycloak Github repo for default themes](https://github.com/keycloak/keycloak/tree/master/themes/src/main/resources/theme)
- [Keycloak container documentation](https://github.com/keycloak/keycloak-containers/tree/master/server)
