The NASA planat the moment seems to be that on any spaceship, they will monitor for radiation, like solar flares, and then when necessary build a temporary shelter. It doesn't sound ideal but their challenge is to do it properly they need heavy shielding which isn't great when they are trying to keep the spaceship as light as possible.
When on Mars they could build their own shelter from natural resources they find on the planet.
I agree, it is one of the big challenges they need to overcome.