Persist Attributes in UserModel

Hello!

I’m encountering an issue when trying to add custom attributes to the UserModel. In my CustomUserStorageProvider, I set an attribute called "fuente" using the following code:

uModal.setSingleAttribute(“fuente”, user.getFuente());

However, when I try to access this attribute in my EmailAuthenticator like this:

@Override
protected Response challenge(AuthenticationFlowContext context, String error, String field) {
logger.info(“Entered challenge method”);
generateAndSendEmailCode(context);
String fuente = context.getUser().getFirstAttribute(“fuente”);

The fuente attribute always returns null.

it seems that the UserModel attribute that i set in CustomUserStorageProvider is not persisting in the rest of my code.

Could you provide guidance on why this might be happening and how I can ensure that the custom attribute is accessible within the EmailAuthenticator?