PacktPublishing / Keycloak---Identity-and-Access-Management-for-Modern-Applications-2nd-Edition

Keycloak - Identity and Access Management for Modern Applications, 2nd Edition
MIT License
98 stars 34 forks source link

CH2 example doesn't display the buttons after logging in #16

Open scottsdrv opened 1 year ago

scottsdrv commented 1 year ago

After successfully logging in to the frontend application included in the CH2 example application, all I see is a blank page. I've tried this in both Chrome and Safari, and the same results are the same.

Looking at index.html, I would expect to see:

Am I missing something?

scottsdrv commented 1 year ago

I was able to get around the issue by changing the "Web origins" config in the 'myclient' client to either a plus sign "+" or an asterisk "*".

qx01065 commented 1 year ago

I too just see a blank screen after login, but changing web origins to * does not help. I am user docker image quay.io/keycloak/keycloak:22.0.3

jockexa commented 1 year ago

Adding "*" to Web Origins helped me.

image

oleg-glushko commented 1 year ago

Just remove a trailing slash after a port number in the "Web origins" URL to fix this problem. Here's what is written in a browser's console output: localhost/:1 Access to XMLHttpRequest at 'http://localhost:8080/realms/myrealm/protocol/openid-connect/token' from origin 'http://localhost:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

glamperi commented 2 weeks ago

This doesn't help me. Does it work with the latest keycloak? Do I need to downgrade ro keycloak 22?