-
Notifications
You must be signed in to change notification settings - Fork 133
Support keycloak-js
v17.0.0
#180
Comments
same problem here OS: macOS 10.14.6 |
any update? otherwise with keycloak-js@^16.1.1 is still working like a charm |
FYI! I found that Next-Auth now has a Keycloak provider. I migrated my app to use Next-Auth and it works really good. |
@fredriklindell wow thats nice. But can you show me the workaround how do you implement? |
Any update on this will be really appreciated |
I have the same issue. Also, I'm getting a linter error on these lines stating:
|
it affects also 'keycloak v18.0.0', change needed in node_modules/@react-keycloak/ssr/lib/internals/keycloak.js Line 20 (import default): Line 25 (remove constructor): You are able to manage this package locally by resolving webpack modules, because it has become really quiet here. |
Have the same issue, reverting to previous versions on the other hand create a loop of log-in log-out. Any updates on where this can be fixed? |
I've forked an updated package with Keycloak >=17 support until this one is back, you can use |
Don't use this package or fork anymore, just use an openId connecter (oidc) and get rid of cookies and all that. Keycloak is in change. |
Please don't delete the package, I have a project using it due in 3 days and don't have the time to upgrade. (It's only a "testing"-project with no real issues with loosing things) |
I would never delete any package for sure. Just in case if you build big prod projects, use openid and only bearer. Otherwise you got a hard time to impersonate users role based. |
So after some researches I came across this library here https://www.npmjs.com/package/react-oidc-context which is doing the same job. |
hey @milosrs did you manage to solve the problem? I have the same issue |
I have switched to NextAuth |
can you show me how you implemented with NextAuth? |
@milosrs |
@pecataToshev |
Thank you <3 |
I also chose to use NextAuth in Next.js, and I also created a Backend in Node.js with the implementation of keycloak-connect to simulate a real case, in which we need to consume a service that requires Keycloak authentication, the process is all documented step by step, the implementation in Next.js still has a Refresh Token, if you want to see it here it is: |
@Sup3r-Us3r |
@milosrs Yes I saw your comment, it's just another implementation I wanted to share, both are valid, thanks! |
@Sup3r-Us3r |
npm i keycloak-js@12.0.3 -----this is the solution |
I wanted to switch to nextauth, but i can t understand why does it need client secret for the configuration. |
Hello. |
I solve using the fork version https://www.npmjs.com/package/@react-keycloak-fork/web |
Describe the bug
Unhandled Runtime Error
TypeError: Keycloak is not a constructor
When using
@react-keycloak/ssr
together with the latest version ofkeycloak-js
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Page should render without error as when same config but for earlier version of
keycloak-js
(v16.1.1).Desktop (please complete the following information):
Additional context
Unhandled Runtime Error
TypeError: Keycloak is not a constructor
Call Stack
getKeycloakInstance
node_modules/@react-keycloak/ssr/lib/internals/keycloak.js (25:0)
new SSRKeycloakProvider
node_modules/@react-keycloak/ssr/lib/SSRKeycloakProvider.js (63:41)
The text was updated successfully, but these errors were encountered: