Repository navigation
Node.js adapter deprecation #9818
Replies: 23 comments 32 replies
|
To put in my two-penny worth: openid-client is certified, exposes a framework agnostic API, and supports Passport.js out of the box. By the way, did you plan to notice users of this deprecation ahead of time on the npm.js page and deprecate the package? |
|
I don't know if this is the place to mention this, but when we no longer support adapters it will make using keycloak harder. I think it will be harder to maintain and have good examples of how to get started with keycloak |
|
I share the same perspective as Stian. I see some reasons for deprecating the Node.js adapter:
|
|
I am all in favor of deprecating this, considering we realistically cannot keep maintaining this. Also since there are better options available that are open-source and easy to use. That said, I think we should clearly communicate that this is deprecated by adding it to the readme of the repository and perhaps lock some things down on the repo. Also I believe that one of our strengths was the comprehensive documentation we had, and perhaps we should invest in some community guides with common frameworks and libraries to help folks get started. |
|
I also found the keycloak-connect adaptor very easy to use and was worry about the barrier to entry. Gave openid-client a go, found it difficult to use/understand on its own. In the ended using it with passport.js intergration. Got it working in the end and I have a blog https://dev.to/austincunningham/keycloak-express-openid-client-3mmg for anyone who is interested. |
|
Are there plans to integration test any of the recommend adapters with Keycloak? |
|
Is it also in the plan to support adapters for mobile applications such as https://appauth.io/ ? |
|
@stianst can we have a docs update in the recommended way of using openid-client to secure nodejs bearer clients ? Honestly, I didn't see any straightforward example into doing that on node, and most of the examples in the openid-client library seem to be biased towards confidential clients. |
|
I think this issue is limited to the node.js adapter versus client side. But would like to confirm that as from the node-openid-client docs - |
|
I spent some time this week looking at oidc clients. From what I can see openid-client is the most widely used client (based on weekly downloads), is well maintained with a shallow dependency tree, and has no red flags from my review so far and run of npcheck. The one area of minor concern is that it would be better if the project was part of a foundation and/or had regular contributors from multiple organizations versus a single maintainer(that is what it looks like based on git commits), but I don’t think any of the alternatives have that either. It was relatively easy to integrate into one of the existing Keycloak quickstarts using common practice for Node.js (passport) and seems to work as expected. The updated app.js for the example that supports either bearer or oidc is in https://drive.google.com/file/d/13-Y3X2CaTGFs3xkYkhipJ6pFWrJczPtB/view?usp=sharing I’m planning to get some additional feedback from the RH/IBM Node.js reference architecture team, the internal RH Node.js team and some of the internal chat rooms, but so far I think openid-client looks like a good candidate. It might also be good to take a look through the code once the decision is made as well. More details of what I looked/considered in - |
|
After spending quite a bit of time, I found this example for using bearer tokens with rotating keys. I'm still working on the verifying the roles in the token, i.e. replacing |
|
What are your thoughts on express-openid-connect? I found it very easy to use and understand, while I still struggle to wrap my head around openid-client + passport.js. |
|
After spent my weekend on the current Node.js adapter i finally found this discussion. PLEASE UPDATE AT LEAST THE README WITH A FUTURE DEPRECATION NOTICE ASAP Sorry to shout, but really ... The cool thing of current nodejs adapter is that yes, it's really fast to implement and easy to understand ... and patch. The bad thing of current nodejs adapter is that you can't use it a docker context if your development domain names are not DNS resolvable or have a complex config (i.e reverse proxy in front of keycloak for SSL/TLS offloading). Regarding alternatives, i'm using https://www.npmjs.com/package/grant (123,289 weekly downloads) for years for authentication but in oauth2 context only. It pretend to play well with keycloak. I have to investigate this deeper. Much more flexible than passport and perhaps a little bit less complicated than openid-client (imho). |
|
I have spent quite some time trying to integrate Node.js adapter with my application. I learned about deprecation only by accident, while reading through some unsolved issues. Please update the documentation and README files. |
|
I have made the same experience as so many others here: keycloak-connect is very straightforward and simple to use. express-openid-connect is not so much straightforward and I am still struggling getting it working with online validation (where keycloak-connect worked out-of-the-box). I then tried the openid-client package. It is more low-level than keycloak-connect and I had to write about 100 lines of code to make it work for my case. That is ok for me and seems the more reasonable solution than express-openid-connect. So a 👍 for openid-client. |
|
Hey, I'm new with Keycloak and authentication in general. So this is a stypid question, but what actually is the purpose of this adapter? So considering a fullstack application with frontend and backend: |
|
From my point of view, keycloak-connect as so much functionality that I did not find in any of the packages which I have tried to integrate. Some packages have different functionality altogether like @keycloak/keycloak-admin-client But it also does not provide what the most users and developers are looking for in the adapter.
For now, I think the developers are having no way of using keycloak in nodejs and they know the adapter is deprecating so they can't use it and there aren't any good alternatives for it. So they are stuck or writing their own code for integration keycloak with their application. |
|
Thanks everyone for your input, we have decided to delay the removal of adapters, and will come back with more details around Node.js in the future, but for now rest assured they will continue to be supported for quite some time, and we will find suitable alternatives prior to eventually removing the Node.js adapter, including support for Keycloak Authorization Services. For more information around the updated plans please see https://www.keycloak.org/2023/03/adapter-deprecation-update.html. |
|
I don't know if this is the right place to put this question to, but I was wondering, in order to only validate Keycloak access tokens without this library, which express-like middleware can I use? |
Suggestion on related docs improvementI believe docs are missing details in multiple important places. I opened an issue with few suggestions on improvements. |
|
@stianst Thanks for all the work on Keycloak! I saw the note about the Node.js adapter deprecation and just noticed it's been a couple of years since that update. Curious if there have been any developments or recommended alternatives for using Keycloak with Node.js since then? Or maybe any community projects you'd suggest looking into? Would really appreciate any pointers—thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Keycloak is deprecating most adapters in the future, for more information see https://www.keycloak.org/2023/03/adapter-deprecation-update.html.
The Node.js adapter although having a fair amount of usage is not something we are able to continue to maintain due to lack of capacity and developers familiar with Node.js on the team. It has also suffered from lack of maintenance over a longer period of time.
We are actively looking for alternatives to recommend, and would love feedback in this regard.
All reactions