Username and password in credentials should be optional
Closed this issue · 1 comments
tristan-fitzgerald-vineti commented
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
keycloak-nodejs-admin-client/src/utils/auth.ts
Lines 7 to 8 in 1a94e37
It would be great not to need the any above.
galsilb commented
For future reference, using username: null, password: null
dose the trick.