Can "keycloak-admin-client" library be used in Corteza Corredor server script?

Hello,
Did anybody use ’ keycloak-admin-client JS library in server automation script?

I installed (npm install) the library and when I create a new ‘KcAdminClient’ object, the server gets error - Error: startBatch failed.

Can this library be used for server automation script? I don’t see any reason why not.

Thank you for any comment.

Hi ironman , did you solve thist issue ?

Regards, M.

Hi @ironman can you explain in more detail what it is you’re trying to achieve by doing this please?

Hi nmccarthy,

For my problem (i think same as ironman’s): it is described more here : Corredor server script requires dynamic import.

For me i need to use keycloak to get data about users to corteza.

M.

Hi @miroslav.capkovic @ironman sorry to take a couple of days to get back to you. This really isn’t a supported setup and probably drifts into the “needs consulting services” category. Happy to discuss further if that’s a path you wish to take.

Hi nmccarthy,

Thanks for reply. Just for understanding: Do you mean that corredor is unsuported or usage of such npm modules in corrrredor server script is unsuported ?

No one has ever tried this before so you’re going into uncharted territory.
Using external libraries can work, but you’ll have to debug it yourself since no one has any experience with this.

Thanks for info.

FYI

Finally I workaround-ed this issue using GRPC library in corredor server script and encapsulating necessary KC logic into node GRPC server. Another benefit of this solution is isolating complex logics from server scripts.

M.

Thanks for the feedback and tip @miroslav.capkovic. Please keep us updated on how this goes for you!