-
Bug
-
Resolution: Done
-
Undefined
-
None
Before reporting an issue
[x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
adapter/javascript
Describe the bug
Cannot generate auth token using keycloak admin client after upgrading the js library to 26.5.3. Downgrading to v26.5.2 fixes the issue.
Version
26.5.3
Regression
[x] The issue is a regression
Expected behavior
No errors to be thrown.
Actual behavior
TypeError: Cannot read properties of undefined (reading 'split')
at decodeToken (.../lib/utils/decode.js:2:31)
at KeycloakAdminClient.setRefreshToken (.../lib/client.js:109:37)
at KeycloakAdminClient.auth (.../lib/client.js:83:14)
How to Reproduce?
1. install v26.5.3
2. run the following snippet
import KcAdminClient from '@keycloak/keycloak-admin-client'; const kcAdminClient = new KcAdminClient({ baseUrl: process.env.KEYCLOAK_URL, }); await kcAdminClient.auth({ clientId: process.env.KEYCLOAK_ADMIN_CLIENT_ID, clientSecret: process.env.KEYCLOAK_ADMIN_CLIENT_SECRET, grantType: 'client_credentials', });
Anything else?
No response
- links to