0

I am trying to create my own keycloak adapter for keycloak-js because I am using a non-supported adapter, and I am having problems understanding how to handle a successful login.

When I do new Keycloak() all the on events are undefined. In the default javascript adapter the they call kc.onAuthSuccess() but as I said, it is undefined in my instance unless I manually set them.

So, after I get the auth code and/or the token I have no idea how to say to keycloak "Ok now I am logged in".

Calling this.myKeycloakInstance.authenticated is always false.

How do I inform the keycloak instance that the user is authenticated?

distante
  • 6,438
  • 6
  • 48
  • 90
  • It looks like in your case the keycloak cookies are missing. After you successfully authenticate keycloak has some authentication cookies(ex: AUTH_SESSION_ID) which it uses to identify and associate further requests. So if these are missing you might face such issues. – Umakanth Oct 05 '22 at 11:23

0 Answers0