You need to instantiate like this, it will work.
var keycloak = Keycloak('keycloak.json');
I tested with KC 3.4.1.
Thanks
On Thu, Dec 14, 2017 at 6:08 PM, Marek Posolda <mposolda(a)redhat.com> wrote:
The best is likely to look at Keycloak quickstart/examples for JS
adapter and compare what is different.
Marek
On 12/12/17 10:45, Corentin Dupont wrote:
> Hi guys,
>
> I use this code in my javascript application:
>
> var keycloak = Keycloak();
> keycloak.init().success(function(authenticated) {
> alert(authenticated ? 'authenticated' : 'not
authenticated');
> }).error(function() {
> alert('failed to initialize');
> });
>
> Since I updated Keycloak I get the message 'failed to initialize'.
> It was working well with the previous version of KC 3.2.
>
> What could it be? How can I get a better error message?
>
>
> Thanks!
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
--
Regards,
Abhishek Koserwal
Software Application Engineer, ADS
Red Hat (Pune, India)
IRC: akoserwa
The capacity to learn is a gift; The ability to learn is a skill; The
willingness to learn is a choice -- Brian Herbert