Closed thebetterjort closed 3 years ago
@thebetterjort You can use as example this method from adminClient.js
. User's attributes are stored in the user.attributes
field.
removeTestUserCustomerId() {
return adminClient(this.config)
.then(
client => this.findTestUser()
.then(
user => {
user.attributes = user.attributes || {};
user.attributes.customerId = undefined;
return client.users.update(this.config.realm, user)
.then(() => 'customerId removed');
}
)
);
}
You can get a custom attribute from the ID token
as described
https://github.com/v-ladynev/keycloak-nodejs-example#add-custom-attribute
It was a question.
@v-ladynev Thanks for this repo, its very appreciated.
I'm trying to return some custom attributes that I have created for each user to the client. It's unclear to me how to do this. Do you know how I can return this data?