๐Ÿ”ŒAccount REST API

The Keycloak Account v3 (the default account theme that comes with Keycloak) is built on top of a REST API. You can consume this API from your Keycloakify Account theme! So, if you feel limited by the kcContext you get in the Account pages, you can leverage this API.

While this support is still a bit rough around the edges, we are working to better integrate it. Here is a minimal demo of how to call the API:

Branch of the starter template modified to call the Account REST API

Here are the relevant changes:

The commit where the API call was added

You can find the code for the Account v3 theme here. This will help you infer all the available endpoints. You can also enable the Account v3 theme in your Keycloak and use the network tab to see the available endpoints.

If you run npx keycloakify start-keycloak in the modified starter, login with the test user, click on the account link, and open the dev tools, you'll see a logged response to an Account REST API call:

Last updated