Theme files are cached under a path that only changes with Keycloak's
version, for 30 days, so returning players kept the grey stylesheet.
It is renamed to login.css, and theme files are now cached for an hour.
A script in the page's head reads the theme the web app saved in the
mancala_theme cookie, or follows the system's color scheme, and puts the
theme's class on the page. The stylesheet takes the redesign's colors,
font, header, cards, fields and pill buttons; the logo and the board on
the card are masks in the theme's colors.
The mancala login theme extends keycloak.v2 with one stylesheet: the game's
app bar and logo, the board's colors, pit-shaped inputs, pill buttons and a
board with stones on top of the card. Dark colors follow the system color
scheme. The realm turns the theme on and offers English and Turkish.
The test container now loads the theme and checks that the login page uses
it in the requested language.
- postgres replaces keycloak-db and holds a keycloak and a mancala database,
each with its own user, created by apps/postgres/init
- valkey with an append-only file for live game state and caches
- backend gets DATABASE_URL and VALKEY_URL
- Custom authenticator creates and logs in a guest user when the
authorization request has guest=true; other requests get the login form
- Scheduled task removes guests with no remaining sessions
- Realm export with mancala-web PKCE client, guest role and guest-aware
browser flow (verify profile disabled so guests are not asked for details)
- Dockerfile building the extension into a Keycloak 26.7.5 image
- Keycloak and Postgres in compose; nginx proxies auth.playmancala.app
and rate limits the auth endpoint
- Integration tests run the extension and realm in a Keycloak container