So far as I recall oneboxing worked fine in our login required forum. It was/is a heavy used feature. And it’s not a private category.
We also oneboxed links to private categories. Users without permission didn’t see the box, just the link. If they click the link, they get an “error message”. That’s fine.
If I have the time today I will checkout and test some previous versions of Discourse locally.