Hi @alelor01,
Thanks for your responses.
Yes, the other way is to use a Post-Login action to assign the user a role on the first login and append it as a custom claim.
Let me also clarify that the Post-Registration Action is asynchronous, while the Post-Login Action is synchronous. This means that the timing of when these actions complete are not synced in order. Therefore, you are experiencing a scenario where the Post-Login action is unaware of the updates performed on the user during the Post-User registration flow.
A workaround to hardcoding these values is to append them to the user_metadata. This way you can still call event.user.user_metadata
to retrieve the roles you need and proceed accordingly.
Thanks,
Rueben