Hi my friend ! 

Just to let you know I started to look at your branch and indeed you better not be epileptic to survive the crazy reloads ;)
I have nothing to push right now but I have some ideas : 

* Like you mention, the redirect and main route broke the stuff. So, I think we should remove that and do the initial redirect in the success callback of the keycloakAuth.init call. I have a local branch where I manage to do that, but it's really hacky and I face another issue , the first next REST call fails because there are not auth info. But ! This is there where we have to introduce the Auth interceptor like here https://github.com/keycloak/keycloak/blob/master/examples/demo-template/angular-product-app/src/main/webapp/js/app.js#L43-L60

I think based on this, we should be able to find a solution. I will try to push my work ASAP and maybe some dudes for KC could give us some hints as well.

Have a good weekend ! 

sebi 



On Fri, Jun 6, 2014 at 6:05 PM, Bruno Oliveira <bruno@abstractj.org> wrote:
Good morning,

I'm struggling to integrate Keycloak.js with our admin-ui. Everything
works perfectly well out of admin-ui with UPS and Angular.js as you
might notice here:
https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak-angular

The issue lies when I enable the routes related with redirect and
MainController:
https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak_angular_integration.
Just open http://localhost:8080/ag-push and watch your browser reload
like crazy. When the main route and redirect are disable, everything goes
well:
https://github.com/abstractj/aerogear-unifiedpush-server/commit/dd9438c6503061fba8aa0e0d77973971888e9379


At first glance it doesn't sound to be a problem on KC.js, once already works with Angular.js:
https://github.com/keycloak/keycloak/tree/master/examples/demo-template/angular-product-app.

If you have any idea, help is appreciated.

--

abstractj
_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev