Hello everyone ,
We have requirement where underlying framework uses email, preferred_username, name, given_name, family_name and nickname.
We can not provide scope =“profile” because of framework limitations .
So using actions we tried to add username in custom claims but because of preferred_username is part of non-restricted claims it’s not being added to id token
api.idToken.setCustomClaim(preferred_username, event.user.username);
We can not use namespace/preferred_username as well because framework won’t recognize it .
Is there a way to use “preferred_username” in id token using custom claims?