You need to initialize Keycloak before AngularJS is initialized. Otherwise
Angular and Keycloak fights about rewriting the URL and you end up with the
infinite loop. It probably only works in Edge because it's slow ;)
We've got around this by not using ng-app to bootstrap Angular, but instead
bootstrap it from within the Keycloak init method. It's a bit of a hack,
but we haven't had the resources to write a proper Angular plugin for
Keycloak. Take a look at:
On 3 November 2015 at 07:11, Stuart Jacobs <stuart.jacobs(a)symbiotics.co.za>
wrote:
Good Day,
I am working on a angular administration web project using wildfly 8.2
with Keycloak.
The base url to my site is
http://localhost:9000/#/dashboard/home.
Keycloak does a successful login when using the new Edge browser from
Windows but in any other browser it goes into an infinite loop between the
landing page url and the landing page url appended with the token provided
by Keycloak.
I specify my redirect uri as
http://localhost:9000/* because if I specify
the full landing page uri it returns invalid, I presume this is due to the
# anchor symbol in the uri?
My question is what is a possible cause of this infinite loop and what is
the correct way to keep the # anchor and specifying specific redirect uri's?
Kind Regards
Stuart Jacobs
********************************************************************************
This email and any accompanying attachments may contain confidential and
proprietary information. This information is private and protected by law
and, accordingly, if you are not the intended recipient, you are requested
to delete this entire communication immediately and are notified that any
disclosure, copying or distribution of or taking any action based on this
information is prohibited.
Emails cannot be guaranteed to be secure or free of errors or viruses. The
sender does not accept any liability or responsibility for any
interception, corruption, destruction, loss, late arrival or incompleteness
of or tampering or interference with any of the information contained in
this email or for its incorrect delivery or non-delivery for whatsoever
reason or for its effect on any electronic device of the recipient.
********************************************************************************
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user