<div dir="ltr">Hi my friend ! <div><br><div>Just to let you know I started to look at your branch and indeed you better not be epileptic to survive the crazy reloads ;)</div><div>I have nothing to push right now but I have some ideas : </div>
<div><br></div><div>* 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&#39;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 <a href="https://github.com/keycloak/keycloak/blob/master/examples/demo-template/angular-product-app/src/main/webapp/js/app.js#L43-L60">https://github.com/keycloak/keycloak/blob/master/examples/demo-template/angular-product-app/src/main/webapp/js/app.js#L43-L60</a></div>
<div><br></div><div>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.</div><div><br></div><div>Have a good weekend ! </div>
<div><br></div><div>sebi </div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 6:05 PM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good morning,<br>
<br>
I&#39;m struggling to integrate Keycloak.js with our admin-ui. Everything<br>
works perfectly well out of admin-ui with UPS and Angular.js as you<br>
might notice here:<br>
<a href="https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak-angular" target="_blank">https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak-angular</a><br>
<br>
The issue lies when I enable the routes related with redirect and<br>
MainController:<br>
<a href="https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak_angular_integration" target="_blank">https://github.com/abstractj/aerogear-unifiedpush-server/tree/keycloak_angular_integration</a>.<br>
Just open <a href="http://localhost:8080/ag-push" target="_blank">http://localhost:8080/ag-push</a> and watch your browser reload<br>
like crazy. When the main route and redirect are disable, everything goes<br>
well:<br>
<a href="https://github.com/abstractj/aerogear-unifiedpush-server/commit/dd9438c6503061fba8aa0e0d77973971888e9379" target="_blank">https://github.com/abstractj/aerogear-unifiedpush-server/commit/dd9438c6503061fba8aa0e0d77973971888e9379</a><br>

<br>
<br>
At first glance it doesn&#39;t sound to be a problem on KC.js, once already works with Angular.js:<br>
<a href="https://github.com/keycloak/keycloak/tree/master/examples/demo-template/angular-product-app" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/demo-template/angular-product-app</a>.<br>
<br>
If you have any idea, help is appreciated.<br>
<br>
--<br>
<br>
abstractj<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</blockquote></div><br></div>