Happened with my cousin.
Her mum had an affair, she's the youngest. The dad knew, but for some reason accepted it. Cousin didn't know......until she did an ancestry thing in her 50's.
By then both parents were dead.
But.....I had known for years by then and didn't know that they didn't know. So when her (half!) brother told me, I said "yeah, I know". Which was obviously a bit tactless, but to be fair, the way he mentioned it wasn't "she's just found out", it was "dad isn't A's dad".
But, even worse, they then asked me if our grandparents had known (and my dad) and I had to say yes (how else would I have known?). And I think that was actually more hurtful.
Though nan and grandad never ever did anything to show it, never. Sadly, her kids would be the only great grandchildren my grandparents had, but they weren't (her siblings didn't have kids, I don't, my brother has one but I'm 100% sure he's not the dad, my sister does but we don't have the same dad). My grandparents did treat them as if they were their great grandchildren though.
She never knew who her dad was. All people who might have been able to tell her were dead. I told them the small amount I knew but I have no idea how accurate or useful it was.