keycloak/keycloak-nodejs-admin-client

Username and password in credentials should be optional

Closed this issue · 1 comments

Describe the bug
In the code segment, these two properties are required, but not needed for a grantType of client_credentials. Making them optional would prevent ide errors that can be misleading.

Expected behavior
If I am using a clientId and clientSecret, I shouldn't need to provide the username or password or avoid type errors by using any as a patch. In testing, the auth works without those two properties being set.

Code Lines

username: string;
password: string;

Screenshots
image

It would be great not to need the any above.

For future reference, using username: null, password: null dose the trick.