Hi all,
I am using Keycloak server and keycloak-js with the same version 26.0.0
But when I test with my ReactJs app, I got this error. Could you tell me the reason of it?
For someone giving you a better response then me it might be useful to know if you use server side rendering, progressive web apps or similar and if so if the error happens when running the code in the browser or when it’s run on the server.
I am experiencing the same while testing the upgrade to Keycloak server and keycloak-js to version 26.0.0, but only when running on http locally, when switching to self-signed https locally, the login works.
Hi there, see this snippet from the docs on Migrating to 26.0.0
Keycloak JS now requires a secure context to run. The reason for this is that the library now uses the Web Crypto API for various cryptographic functions. This API is only available in secure contexts, which are contexts that are served over HTTPS,
localhost
or a.localhost
domain. If you are using the library in a non-secure context you’ll need to update your development environment to use a secure context.
Hi,
Have you test with an old safari ?
I’ve got the same error message on safari 15.1, I tested on localhost, I tested on server with https and localhost with https but I still have the error. It works fine on chrome, that means that it’s working on localhost or server with https but not on server with http
Regards,