ebondu / angular2-keycloak

Angular 2 Keycloak client wrapper
19 stars 26 forks source link

Why checkLoginIframe should be marked as false? #10

Open carlosthe19916 opened 7 years ago

carlosthe19916 commented 7 years ago

I was using this module but I don't know why checkLoginIframe should be marked as false. Is There a problem if I use checkLoginIframe as true?

I tried to mark checkLoginIframe as true and it seems that login don't work after that...

ebondu commented 7 years ago

When the checkLoginIframe is enabled, an iframe checks the session status. The behavior is supposed to be the same to the javascript adapter. I tested it successfully so maybe it is just a configuration issue ? Can you give me more details about your conf ?

rraksi commented 7 years ago

I tried enabling the checkLoginIframe flag in conjunction with onLoad: check-sso and I got a redirect loop between the app and keycloak. My keycloak server is on a different port then the app (58080 vs. 3000). Is it possible that this is an issue? From the logs below I see that the origins at the message send and recieve don't match:

login iframe LOADED
main.bundle.js:46213 KC_CORE: sending message to iframe frontend-app undefined origin :http://localhost:58080
main.bundle.js:46616 checking iframe message callback..[object Object] http://localhost:3000

Is there a way to solve this?

elhay-av commented 7 years ago

here they say that checkLoginIframe caused error after some refresh token intervals https://stackoverflow.com/questions/38206033/aurelia-keycloak-integration

ebondu commented 7 years ago

Hi, @rraksi, the port number should not be an issue for checkLoginIframe (I tested iframe + check-sso on different ports).

manuFL commented 4 years ago

redirect loop here to with login-required + checkLoginIframe and React, only on Safari browser (don't know if it is related)

ebondu commented 4 years ago

Hi, which version of the server are you testing ?