问题
I need your help for a special usecase, I searched on the internet but didn't found anything that would mach my case. I'm new to keycloak so it may be something easy to do but I failed to resolve it :
I have two apps with spring boot security which are connected to the same keycloack. Front-end of both was generated by JHIPSTER. Let's call them app1 and app2.
1st case : I'm connected to app1 and app2 from the same browser, it works well, I can request app1 from app2.
2nd case : I'm connected to app2 only and try to request app1: I got 401 response.
My question is why this is happenning while app2 is using the same keycloak as app1 ? I tried to use same and different clients but it does not change anything.
PS: I already look into issue like this one: Keep authentication between 2 applications with Keycloak SSO where it is explained that the use of the JSESSIONID cookie only works on the app it was generated on (that's why i think 1st case works). So I also tried to use the Javascript adapter ... but i don't think that it will solve my problem (2nd case).
Thanks in advance.
来源:https://stackoverflow.com/questions/62156692/authentification-of-2-apps-with-the-same-keycloak-sso