Hello all,
I did some hacking today and was able to get OIDC working with a JHipster backend an an Ionic app on the frontend. I had to make some modifications in the backend for this to work:
2. Turn on Implicit Flow for the “web_app” client in Keycloak.
3. Add @EnableResourceServer to the SecurityConfiguration.java class.
4. Change the default port from 8080 to something else when running in iOS Emulator. This is necessary because the emulator runs on 8080.
Ideally, none of this would be necessary and I could just call “
http://localhost:8080/login”, but while the redirecting works, the cookies don’t seem to be set and calls the API fail.
I used angular-oauth2-oidc to make things work, and my proof of concept shows it works with both Keycloak and Okta.
Do y’all think it’d be OK to modify the default Keycloak realm to have the first two changes? If not, I can do it as part of my module. I have to do #3 anyway. I have a warning about the 4th point as part of the generation process. I’ve attached a screenshot below.
Thanks,
Matt