Since soap--even "biodegradable" soap--is toxic to much aquatic life, especially amphibians and invertebrates, I never take any. If you insist on using it, make sure you are several hundred feet from any water source, including dried up seasonal watercourses.

You can scrub your hands with sand or gravel and water to remove dirt, and then use hand sanitizer. That's what I do.

All soap contains animal or vegetable fats, whose odor may not be apparent to you, but will definitely be apparent to a bear, raccoon or other interested animal. Their sense of smell is many times stronger than a human's.
_________________________
May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view--E. Abbey