If she not only knew his middle name and the exact spelling of his complete name, as well as carrying his child for nine months, she also knew his age and plenty of other details about him!
Maybe you're assuming too much. We know that Obama Sr. was known for his promiscuity and polygamy. I'm sure he wasn't honest all the time with what he told his multiple women. And SAD, young as she was at the time, probably wasn't interested in investigating his background in any detail. They were just comrades in a common socialist cause.