[keycloak-user] Failed to initialize in KC 3.4

Bob McWhirter bmcwhirt at redhat.com
Tue Dec 19 09:28:50 EST 2017


And you may wish to use a fully-qualified rooted path to keycloak.json, if
you’re doing a single-page-app with browser-based routing, as it seems to
look for the argument relative to the current window location, which may
not be / when doing SPAs.  Using an absolute path works in that case, such
as “/keycloak.json”

-Bob

On Mon, Dec 18, 2017 at 1:55 AM, Abhishek Koserwal <akoserwa at redhat.com>
wrote:

> 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 at 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 at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/keycloak-user
> >
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at 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
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list