I have skin condition and I'm required to face the sun directly, my question is, is it harmful for my eyes to face the sun even when I'm looking away?

No harm. As long as you do not face the sun with open eyes, you should not get into trouble. Consider wearing sunglasses if you have to do this for lengthy intervals or wearing the kind of goggles that are used in sun tan bed booths.