How to add the default user attributes to the self registered user

Hello,

As per our requirement we wanted to add some pre-defined user attributes to all the users who register via keycloak registration page.
we already added the token protocol mappers in keycloak for those user attributes to get it in generated token.
but facing problem for newly registered users, currently we need to programmatically update those user attributes to those users then they’re allowed in our system.

Is there any workaround or valid solution from which we can add the user attributes.

Thanks in advance.

Any suggestions or workaround on this??