Skip to content

Custom keycloak login theme styles.css return error 404 #34028

@csloh-tfs

Description

@csloh-tfs

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

login/ui

Describe the bug

I'm following Keycloak guide to create a custom login them. The custom css file is unable to fetch by Keycloak v26.0.0, error 404 is returned. It was working in v25.0.6.

Version

26.0.0

Regression

  • The issue is a regression

Expected behavior

styles.css should be returned

Actual behavior

response error 404

How to Reproduce?

Following this guide Creating a theme

themes
└── mytheme
    └── login
        ├── resources
        │   └── css
        │       └── styles.css
        └── theme.properties
  1. in the theme.properties file add the following lines:

parent=keycloak
import=common/keycloak
styles=css/styles.css

  1. in the styles.css file add the following lines:

.login-pf body {
background: DimGrey none;
}

  1. start keycloak server with the following command
    sh kc.sh start-dev
  2. After login, go to master Realm settings, change the login theme to mytheme
  3. Logout from Keycloak Admin Console
  4. Then Keycloak is unable fetch mytheme login styles.css

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions