Keycloak desktop app redirect says We are sorry

I am following this Keycloak guide to secure a Java desktop application. I have setup the Client as stated:

enter image description here

In my application, when I call loginDesktop(), I get the browser to sign in and I can sign in correctly. But after the sign in, the redirect page says "We are sorry. Page not found":

enter image description here

Other info: Keycloak server is hosted on Google Cloud Run and using a Google CloudSQL Postgres instance for persistence. The docker image from Keycloak is using Keycloak version 16.1.1. I am using Google Cloud SQL proxy to connect to Postgres. Persistence is working correctly - I can login throughout runs.

Any help is appreciated.


Solution of the problem

If you are using the latest guide, it works with keycloak 17+.

There has been a change in the default url for keycloak server with version 17 (with the quarkus distribution, in fact, which is the default with keycloak17):https://www.keycloak.org/migration/migrating-to-quarkus

For you this means your keycloak server is deployed on the /auth path, so, in your configuration:

{
"realm": "desktop-app-auth",
"auth-server-url": "http://localhost:8081/auth",
"ssl-required": "external",
"resource": "desktop-app",
"public-client": true,
"use-resource-role-mappings": true,
"enable-pkce": true
}

auth-server-url should have /auth.

Commentaires

Posts les plus consultés de ce blog

Erreur Symfony : "Une exception a été levée lors du rendu d'un modèle"

Détecter les appuis sur les touches fléchées en JavaScript

Une chaîne vide donne "Des erreurs ont été détectées dans les arguments de la ligne de commande, veuillez vous assurer que tous les arguments sont correctement définis"