Giter Site home page Giter Site logo

keycloak-theme-template's Introduction

๐Ÿš€ Try it for free in the new Phase Two keycloak managed service.

This repository contains examples for developing a Keycloak login theme locally. You can use the examples directly, customize them and package them with the included Maven project, or use the CSS directly if you are using the Phase Two Themes extension.

Sample themes

The 3 example CSS themes that can be be used in Phase Two's enhanced Keycloak without installing a custom library:

Look at the article for more information on using the CSS directly with the Phase Two Themes extension.

Install them in the Phase Two Admin UI console by navigating to the Styles section and selecting the Login tab. Paste the style into the CSS field and click Save. Screenshot from 2023-01-12 21-20-30

You must have the Attributes login theme selected in Realm settings -> Themes for the changes to take effect. Screenshot from 2023-01-12 21-18-58

Keycloak theme template

You can also use these as base template for developing a Keycloak theme locally.

Developing custom Keycloak themes

  • Create a folder for your custom theme within the src/main/resources/themes directory, if one does not already exist.
  • Then add a subdirectory for the theme type (e.g. admin, login, etc.).
  • Modify any of the files within your custom theme directory. Assuming you are extending the base or keycloak theme, you only need to override the files you want to change.
  • To easily iterate without having to restart the server every time, load keycloak using start-dev with the included docker-compose file caching off: docker compose up

Testing your theme

  • Login to the admin console at http://localhost:8080/auth/admin with admin:admin
  • Go into Realm Settings->Themes and select the theme you are working on (e.g. Login->example)

Packaging the theme for deployment

  • Run mvn package to build a jar that can be placed in the provider (Quarkus) or standalone/deployments (Wildfly) directory of your Keycloak installation.

keycloak-theme-template's People

Contributors

xgp avatar pnzrr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.